in reply to Regarding Declaring Variables
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Regarding Declaring Variables
by Tech77 (Novice) on Nov 17, 2005 at 15:40 UTC |