in reply to Re: How time out can be done here?in thread How time out can be done here?
There's really nothing to explain. It does exactly what you asked for by calling select RBITS,WBITS,EBITS,TIMEOUT.
Note that IO::Select is easier to use than select.
use IO::Select (); my $sel = IO::Select->new($MySocket); my @read = $sel->can_read(3) or die("Time out!\n"); $MySocket->recv($text); [download]