in reply to Re^2: splitting file with mutiple output filenames
in thread splitting file with mutiple output filenames

One can even unify the calls to open and binmode:

open my $fOut, '>:utf8', $outname or die "Can't create $outname: $!\n" +;