Re: I need to make this not end

2003-06-16 Thread Rob Anderson
Hi err, Mr T. Here's a solution to your question, but from a different point of view... -- #!perl -w use strict; my $im_thinking_of = int(rand 10); my $guess; do { print "Pick a number:"; $guess = ; chomp $guess; if ($guess > $im_thinking_of)

Re: I need to make this not end

2003-06-15 Thread Josimar Nunes de Oliveira
A little fix: the line below must come before the "while()" $im_thinking_of=int(rand 10); > while(){ > print "Pick a number:"; > $guess=; > chomp $guess; > if ($guess>$im_thinking_of) { > print "You guessed too high!\n"; > } elsif ($guess

Re: I need to make this not end

2003-06-14 Thread Mark G
} else { print "You got it right!\n"; last; } } <~~~ paste - Original Message - From: Mr.T Mr.X To: Mark G Sent: Sunday, June 15, 2003 2:40 AM Subject: Re: I need to make this not end all right, the only problem with the script you sent is t

Re: I need to make this not end

2003-06-14 Thread Mark G
got it right!\n"; last; } } <~~~paste - Original Message - From: "Mr.T Mr.X" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, June 15, 2003 1:17 AM Subject: I need to make this not end > #!/user/bin/perl -w > > $im_thinking_of=int(rand

I need to make this not end

2003-06-14 Thread Mr.T Mr.X
#!/user/bin/perl -w $im_thinking_of=int(rand 10); print "Pick a number:"; $guess=; chomp $guess; if ($guess>$im_thinking_of) { print "You guessed too high!\n"; } elsif ($guess < $im_thinking_of) { print "You guessed too low!\