use IO::Select; use IO::Socket; my $handle = new IO::Select; $handle->add ( \*STDIN ); while (1) { @ready = $handle->can_read; print "loop \n"; } |
欢迎光临 Chinaunix (http://bbs.chinaunix.net/) | Powered by Discuz! X3.2 |