Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^2: print() on closed filehandle OUT at B.p line 19, <SH> line 1732.

by lidden (Curate)
on Feb 24, 2008 at 17:03 UTC ( #669849=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://669849]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (7)
As of 2023-11-30 08:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?