http://www.perlmonks.org?node_id=594558


in reply to How do I make the garbage collector throw an exception when it fails to auto-close a filehandle?

See this old thread: Catching errors in closing lexical filehandles