in reply to RE: RE (tilly) 2: Adding 2 + 2
in thread Adding 2 + 2
Is that integer range "between 1 and 3" inclusive or exclusive?
You might want to include some error-checking:
{ print "Pick an integer between 1 and 3 (exclusive):" $mynum1 = <STDIN>; (print "Follow instructions!\n"),redo unless ($mynum < 3) and ($mynum > 1) and ($mynum == int($mynum)); }
|
---|
Replies are listed 'Best First'. | |
---|---|
RE: RE: RE: RE (tilly) 2: Adding 2 + 2
by KM (Priest) on Sep 11, 2000 at 20:59 UTC | |
by BlaisePascal (Monk) on Sep 11, 2000 at 21:17 UTC | |
by KM (Priest) on Sep 11, 2000 at 21:24 UTC | |
by turnstep (Parson) on Sep 15, 2000 at 01:03 UTC |
In Section
Cool Uses for Perl