I don't know why getline wouldn't return a record at a time if you set $/ to "\x00". The advantage of doing it this way is that you should burn less CPU time, because the low-level (C) code is actually handling the incoming characters and you get full records. Generally, the less times you can manage to go through a loop, the better. So your get-a-record routine would be just:
my $response;
{
local $/ = chr(0); # or "\x00"
$response = $socket->getline
}