Hi Tech77 !!
This is another way to do the same program, though Grandfather had given a better one i guess..
use strict; use warnings; my $no=12; my $target; do { print "Guess the number : "; chomp($target = <STDIN>); print "$target is too low\n" if ($target < $no); print "$target is too high\n" if ($target > $no); } until ( $target == $no);
Thank you
In reply to Re: Regarding Declaring Variables
by vishi83
in thread Regarding Declaring Variables
by Tech77
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |