sub input { while ( 1 ) { my $input = ; chomp ( $input ); if ( $input !~ /\d/ ) { print "ILLEGAL INPUT\n"; next; } last; } return $input; }