in reply to Re^4: Local socket model
in thread Local socket model

Then perhaps you want to redefine what <> considers a line?
local $/ = "\0"; # Read up to NUL. while (defined(my $messg = <TSOCK>)) { chomp $messg; # Remove NUL. print "$messg\n"; print TSOCK "Hello server!\n"; TSOCK->flush; }