I found that, when you use UTF-16, Perl actually output a "Unicode big endian" text file, not "Unicode".
Probably only following two lines of code are important to check the issue:
open FH, "<:encoding(UTF-16)", "$inputFile" or die "can't open file";
open (NEWFILE, ">:encoding(UTF-16)","$outputFile") or die "can't open file";