in reply to Perl 5.8: warn sometimes writes to STDOUT?
### stdout #1: STDOUT is open #4: STDOUT is open ### stderr #1: warning at x.pl line 1. #1: STDERR is open #1: warning at x.pl line 4. #2: warning at x.pl line 9. #2: STDERR is open #2: warning at x.pl line 12.
FWIW, normally in C it's not a good idea to print to a closed file handle, but I don't know what perl does about this wrt STDOUT/STDERR. The only workaround I can think of might be to reopen STDERR/STDOUT to /dev/null as needed rather than just close them.
|
|---|