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

A NEWLINE!!! What's wrong with a good ol' fashioned "null terminator"?!!? wow...thanks.

Replies are listed 'Best First'.
Re^5: Local socket model
by Illuminatus (Curate) on Oct 07, 2008 at 14:38 UTC
    Yes, the <> operator is the equivalent of fgets (with an essentially unlimited length value) in C.
Re^5: Local socket model
by ikegami (Patriarch) on Oct 08, 2008 at 01:00 UTC
    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; }