{ print "Give me a number:"; $num = <STDIN>; if ($num < 1 or $num > 10) { print "try again\n"; redo; } } print "OK\n";
In reply to Re: restart program on wrong user input.
by ccn
in thread restart program on wrong user input.
by BioGeek
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |