in reply to Re: AJP ping
in thread AJP ping

sysread does not guaranteed, that all 5 bytes can be readed in one block. so you should add a loop over the sysread command.
my $pos = 0; while ( $pos < 5) { my $c = sysread $sock, $pong, 5, $pos or die $!; $pos += $c; }