while (1) { $! = undef; # no error, yet if ($select->can_read(10)) { $rc = sysread($sock, $buffer, 64*1024, length($buffer)); next if $rc; # continue if not error and not "eof" last if defined($rc); # exit if "eof" } else { $rc = ( $! ? undef : 1 ); # WHAT IS HAPPENING HERE????? last if $rc; } redo if $! == EAGAIN ; # Not really expected, even with non-blocking redo if $! == EINTR ; # Signals ! last ; # exit on "hard" error }