open my $fh4, '>:raw:perlio:encoding(UTF-16le):crlf', 'file4.txt' or die "$!"; print {$fh4} "\x{FEFF}"; print $fh4 "AB\n"; print $fh4 "CD\n";