If $ Contents E still has no character \n, printnot add them for you. You have to do it yourself.
There are a couple of other things that can be problematic; here's how to fix them and why.
IO layers
utf8, :utf8, :utf-8. , -, `` > : utf8: unix ".
Open
open , 'my $fh' ; . , . , or .
, :
sub SaveFile
{
my($FileName, $Contents) = @_;
open my $File, ">:utf8:unix", $FileName
or die "Cannot open $FileName";
print $File map { "$_\n" } @$Contents;
close($File);
}
map , , , .
!