in reply to Re: force user to only enter numbers
in thread force user to only enter numbers

This is what I have tried
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