INPUT: print 'number> '; chomp(my $input = ); if ($input and $input =~ /[0-9]+/) { print $input, "\n" } else { goto INPUT }