Thread STDIN überspringen (8 answers)
Opened by naich at 2004-05-19 12:12

sri
 2004-05-19 18:31
#82547 #82547
User since
2004-01-29
828 Artikel
BenutzerIn
[Homepage] [default_avatar]
So is besser.
Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
$|++;
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";
\n\n

<!--EDIT|sri|1084977230-->

View full thread STDIN überspringen