Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

RE: 'nother P(erlython) Hacker

by mt2k (Hermit)
on Sep 10, 2000 at 03:49 UTC ( #31775=note: print w/replies, xml ) Need Help??


in reply to 'nother P(erl|ython) Hacker

My version:
$n=int(rand(1001));print'>'; while(<>){++$i;last if$_==$n;$_>$n?$n--:++$n;print'Too ',$_>$n?'big':' +small',"\n>";} print"Won in $i tries\n";

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://31775]
help
Chatterbox?
[Lady_Aleena]: My perl-fu is bad.
[Lady_Aleena]: I"m getting: Not a SCALAR reference at ../files/lib/Base/ Menu.pm line 114. which is weird because it should be a string.

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (9)
As of 2017-04-27 12:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (506 votes). Check out past polls.