## instead of this: open( my $fh, ">:raw:encoding(ucs2le):crlf", "testa.plp" ); print $fh "\N{CARRIAGE RETURN}\N{LINE FEED}"; close $fh; ## you want either this: open( my $fh, ">:raw:encoding(ucs2le)", "testb.plp" ); print $fh "\N{CARRIAGE RETURN}\N{LINE FEED}"; close $fh; ## or this: open( my $fh, ">:raw:encoding(ucs2le):crlf", "testc.plp" ); print $fh "\N{LINE FEED}"; # :crlf adds CARRIAGE RETURN for you close $fh;