while($x= and $x !~ /^\s*\d+\s*$/) { print "Enter a number\n" }