open(OUT,">$outfile"); open(F1, "<$infile") or die "Could not open $infile for reading!\n";
I realize that this is just an example snippet, but.... verbally fail if $infile won't open, and silently fail if the output file can't be opened? Also, have a look at the first paragraph or two of chomp and how it reacts to changes to $/. You're not removing the trailing newline characters.
Dave
In reply to Re^2: skip newline charater when reading
by davido
in thread skip newline charater when reading
by coldy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |