Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: (Golf) The Animal Game

by redsquirrel (Hermit)
on Jan 23, 2002 at 21:42 UTC ( #140952=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub a {
        print shift;
        my $answer = <STDIN>;
    ...
        return 1 if $answer =~ /y/i;
        return 0;
    }
    
  2. or download this
    my @t = (
        [
            undef,undef,
            ['cat','giraffe',"Is your animal larger than a breadbox?\n"]
        ]
    );
    
  3. or download this
    sub r{my$t=shift;my$x=a($t->[2][2]);$t->[$x]?r($t->[$x]):return $t->[2
    +][$x]}sub
    n{my$t=shift;for(0,1){if($t->[2][$_]eq$b&&!$t->[$_]){$t->[$_]=[undef,u
    +ndef,[$b,$
    a,$q]];return 1}last if$t->[$_]&&n($t->[$_])}}while(1){$b=r($t[0]);if(
    +!g($b)){$a
    =t();$q=i($b,$a);n($t[0])}last if!w()}
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://140952]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (6)
As of 2014-07-10 04:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (198 votes), past polls