use IO::Select; use constant TIMEOUT => 10; ... ... my $select = IO::Select->new(); $select->add($con); # from your example above. # Don't need to save the array returned, there's only one handle. if($select->can_read(TIMEOUT)) { # $con has pending data. } else { # timeout. }
In reply to Re: IO::Socket::INET Dangling Connections
by rpc
in thread IO::Socket::INET Dangling Connections
by simeon2000
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |