if (!defined($stat)) { if $!{EAGAIN} || $!{EWOULDBLOCK}) { ... No data at this time ... } die "sysread: $!\n"; } if (!$stat) { ... EOF ... )