If STDERR fails to close, what are you planning to do about it?

Checking [whether] standard error [closed in a Perl script], though, is a bit more problematic. After all, if STDERR fails to close, what are you planning to do about it? — The Perl Cookbook, 2nd Edition

They go on to suggest a couple of things, but it’s still a funny comment. By way of analogy, compare it to submitting a customer service request to a company saying that the customer service request system is not delivering any customer service requests.

On the very next page, it says “As of Perl v5.8 there is a way to mix [buffered and unbuffered I/O functions]: I/O layers. You can’t turn on buffering for the unbuffered functions, but you can turn off buffering for the unbuffered ones.” Great, really useful! I can turn off buffering on an unbuffered function and end up with: an unbuffered function! The presence of typos like this is really obnoxious, because when I find a confusing passage I have to wonder whether they are making a mistake or I’m just not understanding.

Your ad here for US$1/month.  Find out how.


Leave a Reply, but read first

  1. Feel free to leave replies even to very old posts.
  2. You have pretty much free rein to write whatever you like.  Just make it contentful and it will probably stay, even if you are abusing me.  Just:
  3. Don't bother spamming.  Your links are automatically tagged "nofollow".  You won't increase your Google rating.  Nobody will click them anyway.  Save us both some time.
  4. Advertising Policy: The URL field is for personal blogs, not commercial enterprises.  Have a valid website or product to advertise?  Those do get clicked, and it's cheap.  Click here to advertise.  Otherwise, your URL is subject to deletion at editor's discretion.