Jeff Pang wrote:
So why wouldn't you redirect STDOUT and STDERR to this file too? Many other Perl's errors, like division by zero, are not handle via die or warn. And these messages are printed out even if encountered in an eval.


When operating the files (including opening and writing and closing),you
> have more risks to 'die' than writing to '/dev/null',isn't it?

--
Jeff Pang
NetEase AntiSpam Team
http://corp.netease.com


If you redirect a file handle to an already existing one, there are far fewer things that can go wrong. In fact, when you open a regular file the most common errors are: file not found, permission denied, and disk full. If you have a real hardware problem, your program might be the first to find it but you will have programs failing all over the place. Hardware errors are usually fairly obvious.


--

Just my 0.00000002 million dollars worth,
   --- Shawn

"For the things we have to learn before we can do them,
we learn by doing them."
  Aristotle

"The man who sets out to carry a cat by its tail learns something that
will always be useful and which will never grow dim or doubtful."
  Mark Twain

"Believe in the Divine, but paddle away from the rocks."
  Hindu Proverb

* Perl tutorials at http://perlmonks.org/?node=Tutorials
* A searchable perldoc is at http://perldoc.perl.org/


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to