print SOCKET "Hi there, client!\015\012"; # right print SOCKET "Hi there, client!\r\n"; # wrong #### use Socket qw(:DEFAULT :crlf); print SOCKET "Hi there, client!$CRLF" # right #### use Socket qw(:DEFAULT :crlf); local ($/) = LF; # not needed if $/ is already \012 while () { s/$CR?$LF/\n/; # replace LF or CRLF with logical newline }