use strict; use warnings; use charnames ':full'; open(my $fh, ">:raw", "test.plp"); binmode($fh, ":encoding(ucs2le)"); print $fh "\r\n"; close $fh; #test open(PLP,"<:encoding(ucs2le)","test.plp"); my $string; sysread(PLP, $string, 100); printf("0x%02x ", ord($_)) for (split //, $string);