http://qs321.pair.com?node_id=147373


in reply to Reading an incoming Data Stream..

I don't see a chomp() in there anywhere, so I'll bet you have a newline hanging on to the end of the string. Try
if ($buf eq "\"END\"\n") ^^