#!/usr/bin/perl -w ####################################################################################### # # 'tzara combinations' (Description: generates Tzara combinations) # # Copyright (C) 2003 Wayne Clements # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # See . # # The program is presented as it is on my website. # The html and links are as found in www.in-vacua.com. You can change this as necessary. # # Wayne Clements, www.in-vacua.com. email: invacua_at__btinternet[Do T]com # ######################################################################################## use strict; use CGI qw(:all); my $tzara = ''; my @array = ''; print "Content-type: text/html\n\n"; @array = ("To make a dadaist poem
", "Take a newspaper
", "Take a pair of scissors
", "Choose an article as long as you are planning to make your poem
", "Cut out the article
", "Then cut out each of the words that make up this article and put them in a bag
", "Shake it gently
", "Then take out the scraps one after the other in the order in which they left the bag
", "Copy concientiously
", "The poem will be like you
", "And there you are a writer, infinitely original and endowed with a sensibility that is charming though beyond the understanding of the vulgar
"); shuffle(\@array); $tzara = join '', @array; print "tzara combinations
tzara combinations



$tzara



tzara combinations info



Home"; # fisher yates shuffle sub shuffle { my($array) = shift(); for (my $i = @$array; --$i; ) { my($j) = int(rand($i + 1)); next() if ($i == $j); @$array[$i, $j] = @$array[$j, $i]; } } #EOSub exit();