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.

[ Replace this ad for $1/month ]



Leave a Reply, but read first

  1. Feel free to leave replies even to very old posts.
  2. Is your comment not specifically about this post?  Great!  Go here.
  3. Flame, swear, rant, shout — just don't spam!  You won't increase your PageRank, even temporarily (the URLs are tagged 'nofollow'), and I'll delete it anyway.  Save us both time.

CommentLuv badge