You don't check the status of open()ing OUTPUT_FILE. Change your open to read something like:
I've also used the 3-argument form of open().open (OUTPUT_FILE, ">", $outputfile) or die "Unable to open $outputfile: $!\n";
In reply to Re: print() on closed filehandle
by davis
in thread print() on closed filehandle
by Win
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |