Hi, can someone please help me with the code below and how to use curly brackets. Thank you for your time
#! usr/bin/perl -w $im_thinking=int(rand 10); print "Pick a number"; $guess=<STDIN>; chomp $guess; while($guess != $im_thinking) if($guess>$im_thinking) print "You guessed too high!\n"; elsif($guess < $im_thinking) print "You guessed too low!\n"; else print "You got it right!\n";
In reply to Help with While Loop by gavin100
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |