in reply to Why might a close operation die?

I'm adding this just for completeness. Other people already noted by closing handles to pipes can fail, I'll note why closing handles to files can fail as well.

Perl normally buffers output to filehandles so if there is data pending-write to the handle then the write can fail. close() flushes the buffer prior to closing the handle so it does an implicit print of whatever was left in the buffer. If the write fails during close's flush then close will return a false value. This is just another variation of the print() function failing.