print "Enter a number\n"; $num = <STDIN>; if ($num < 0) { print "please enter a number that is between 0 and 9 \n"; $num = <STDIN>; } #Get input +from the keyboard for($i=1;$i<=$num;$i++) #For loop to repeat a + set of statements until a condition is met { print $i; } print "Press any key to exit"; $key = <STDIN>; #End of Program
In reply to Re^2: force user to only enter numbers
by adroit
in thread force user to only enter numbers
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |