open(OUT,">outfile") || die "Unable to open outfile: $!\n"; foreach (@bigfile) { s/\0/ /g; print OUT "$_"; } close(OUT);