in reply to Parsing data from a data feed

You don't want to compare the characters with hex(0x00), because this is just a 0. Comparing arbitrary strings with 0 won't work, since non-numeric ones will evaluate to 0. You want to say something like  $response == "\x00"

Beyond that little problem, you're not checking the status in the recv call.

You might try instead letting the getline call work and get your data a record at a time, by setting the input record separator $/ to NUL:

local $/ = "\x00"; $response = $socket->getline; if ($socket->eof) { ... }

update: you may have been thinking about chr(0) which returns "\x00".