my $c = ReadKey 0; my $x = ''; while ( 1 ) { last if $c !~ /^[0-9]$/; $x .= $c; $c = ReadKey 0; } return -1 if $c ne ';';