in reply to Re: forgoing explicit file close
in thread forgoing explicit file close

Would it be beyond the realms of possibility for that warning to be produced when a filehandle goes out of scope?


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority". I knew I was on the right track :)
In the absence of evidence, opinion is indistinguishable from prejudice.
I'm with torvalds on this Agile (and TDD) debunked I told'em LLVM was the way to go. But did they listen!

Replies are listed 'Best First'.
Re^3: forgoing explicit file close
by dave_the_m (Monsignor) on Aug 22, 2015 at 10:20 UTC
    Would it be beyond the realms of possibility for that warning to be produced when a filehandle goes out of scope?
    It's a default warning in 5.22.0 onwards:
    $ perl5220 -e'{open my $fh, ">/dev/full"; print $fh "abc"}' Warning: unable to close filehandle $fh properly: No space left on dev +ice at -e line 1. $

    Dave.