in reply to Re: How time out can be done here?
in thread How time out can be done here?

Hi
Thanks a lot for the code. But can you briefly explain me the code.
Regd's
Sanjay nayak.

Replies are listed 'Best First'.
Re^3: How time out can be done here?
by ikegami (Patriarch) on Oct 10, 2006 at 04:20 UTC

    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);