my $num; { print "Please type a number: "; chomp($num = <>); redo unless $num =~ /^[0-9]+$/; }
In reply to Re: force user to only enter numbers
by JavaFan
in thread force user to only enter numbers
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |