in reply to IO::Socket::INET Dangling Connections

IO::Select is what you need. This will allow you to perform a non-blocking wait on the socket.
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. }

Replies are listed 'Best First'.
Re: Re: IO::Socket::INET Dangling Connections
by Anonymous Monk on Feb 21, 2001 at 02:07 UTC
    Thank you very much for that reply. I'm now looking into the docs on IO::Select... it's an interesting module. I'm going to look into it and see if I can figure it out from here. My data processing routines will have to be modified, but I htink I can handle it from here. Thanks so much.