> You can set the correct encoding succinctly on opening files > e.g. open my $fh, '>:encoding(UTF-8)', $outfile
You might also see this even more succinct variant: open my $fh, '>:utf8', $outfile though technically speaking, that will not give you guaranteed conformant UTF-8 because it could contain code points that are excluded from the Unicode standard. So Colin's suggestion is safer. Matthew