<html><body>

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
    I always thought it would be cool to see if a 100 monkies could make a perl script. Something like:

    1. type random text
    2. eval code (could be a `rm -rf *`, but hey, live a little)
    3. save code if eval is good
    4. back to 1
    I never tried to implement this because I was afraid that it would steal my job :)