in reply to Parsing data from a data feed
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".
|
|---|