in reply to print() on closed filehandle WRITE_FH
select changes the default output for print statements, and you've got some print statements after you close WRITE_FH that are then still trying to write to the file. You need to save the original output handle by first saying my $orig_fh = select(WRITE_FH); and then restore it later by saying select($orig_fh); right before or after you close the file.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: print() on closed filehandle WRITE_FH
by TonyNY (Beadle) on Sep 25, 2018 at 19:02 UTC | |
by haukex (Archbishop) on Sep 26, 2018 at 20:10 UTC | |
by TonyNY (Beadle) on Oct 01, 2018 at 12:41 UTC | |
by Your Mother (Archbishop) on Oct 01, 2018 at 13:23 UTC | |
by pryrt (Abbot) on Sep 25, 2018 at 21:14 UTC |