#!/usr/bin/perl #nb the poem is the output # licensed under the Gnu poetic licence (?!) open my $dict, "</usr/share/lib/dict/words" or open my $dict, "</usr/share/dict/words" or die "you call that a \'puter?\n"; my @words = <$dict>; my $count = 100*rand(); { use integer; $count /= 1; } for ( 0..$count ) { my $ptr = rand() * $#words; chomp $words[$ptr]; unless( $_ ) { $words[ $ptr ] =~ /^(.)(.*)$/; my $b = uc( $1 ); $words[$ptr ] = $b . $2; } if ( $_ < $count ) { print $words[$ptr]; print (( rand() > 0.9 )? ";\n" : ' '); } else { print $words[$ptr] . ".\n"; } }
-M
Free your mind
In reply to Ode to a random number by Moron
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |