in reply to Re: Waiting for an event
in thread Waiting for an event

But
$var = <$socket>;
only works if the data coming into the socket happens to be delimited by newlines. Not all network protocols are newline-delimited.