in reply to Reading from socket with timeout (sort of)

You can use IO::Select::can_read() to do what you want.
use IO::Select; # code to initialize $sock my $sel = new IO::Select( $sock ); while (1){ if ($sel->can_read(5 * 60)){ # see if $sock has data. # wait no longer than 5 min while (<$sock>){ # read however many lines you expect } }else{ # log error } } #end while
A better approach would be to write generic functions for reading and writing from/to a given socket with timeouts but I'll leave that as an exercise for you. :)

--perlplexer