in reply to Catch loss of communication

Try IO::Select's can_read can_write

Replies are listed 'Best First'.
Re: Catch loss of communication
by betnt (Initiate) on May 31, 2005 at 12:46 UTC
    Could you be more detailed? I guess these method has to be used before writting or reading in the socket. But my problem is that I do not want to wait till the next print to know that I lost the connection with the socket (like with signal).
      then use select() to wait for something to happen and then check whether you can write, read or it's an error examining its output arguments.

      There are two versions of select available, one from the core (see perlfunc) and the other, maybe easier to use, from IO::Select.