in reply to Re: print() on closed filehandle OUT at B.p line 19, <SH> line 1732.
in thread print() on closed filehandle OUT at B.p line 19, <SH> line 1732.

Nitpick:

Those die statements works "better" without an explicit newline.

my $file = '/nowhere/to/be/seen'; open my $fh1, $file or warn "$file: $!\n"; open my $fh2, $file or warn "$file: $!";
  • Comment on Re^2: print() on closed filehandle OUT at B.p line 19, <SH> line 1732.
  • Download Code

Replies are listed 'Best First'.
Re^3: print() on closed filehandle OUT at B.p line 19, <SH> line 1732.
by ikegami (Patriarch) on Feb 24, 2008 at 17:17 UTC
    No way! There are error messages intended for developers, and there are error messages intended for users. IO errors are clearly the latter, and line numbers are meaningless to the user. If you need the line number to make this error message meaningful, you have a bad error message.
      Good point++

      But when I write code either STDERR goes to /var/log/apache/error_log or I am the user. YMMV.