Help for this page
open(my $in, '<', "filein.dat") or die("Unable to open filein.dat: $!\n"); ... or die("Unable to create file${file_count}.dat: $!\n"); print $fh_out ($_) foreach @buf; }