I was fascinated by the statement "If 100 monkies were sat at 100 typewriters, given an infinite ammount of time one would type the script to Hamlet" I wondered whether perl could do it quicker than infinity on a smaller scale....
#!/usr/bin/perl -w $monkey="japh";@monkee=(32..127);do{$monkie="";do{$monkies=chr$monkee [rand@monkee];$monkie.=$monkies;$yeknom=length$monkie;}until($yeknom eq"4");$eiknom++;}until($monkie eq $monkey);print"$monkie in $eiknom"
Not very obfuscated, I know, but it's my first obfu :)
The Evil but Fickle Dr Lambado
Time waits for no man, unless you have a back button.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Is perl faster than 100 monkies?
by tstock (Curate) on Oct 06, 2001 at 20:59 UTC |