You're experiencing problems since the ordering of :crlf and :encoding is backwards. See PerlIO: crlf layer on Windows interfering with UCS-2 unicode. You want to use the following in your open:
or# With LF<->CRLF conversion :raw:perlio:encoding(utf-16le):crlf
# Without LF<->CRLF conversion :raw:perlio:encoding(utf-16le)
In reply to Re: CRLF not encoding into UTF-16LE correctly on ActivePerl 5.8.8
by ikegami
in thread CRLF not encoding into UTF-16LE correctly on ActivePerl 5.8.8
by desemondo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |