use IO::Socket qw(crlf); # now you can use CRLF constant $|++; # non-buffered