open my $fh, '<$filename' or die "Can't open $filename: $!"; open my $dat1, '>$output' or die "\nERROR: Cannot create/open $out