1234567891011
$|++;vec( my $in, fileno(STDIN), 1 ) = 1;print "INPUT: ";if ( select( $in, undef, undef, 2 ) ) { my $input = <STDIN>; print "INPUT: $input";}else { print "TIMEOUT!\n";}print "END\n";