Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

Re: how to make close() fail

by pvaldes (Chaplain)
on Sep 29, 2012 at 11:25 UTC ( #996363=note: print w/replies, xml ) Need Help??

in reply to how to make close() fail

I'm wondering if there's an easier way.

You shouldn't ever need to use a close line

open my $fo, '<', "somefile" or die $!; ... blah blah # close($fo) implicit, not necessary

Any suggestions to make close fail?

use warnings; use strict; close (undef) or die;

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://996363]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2016-10-23 16:24 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (301 votes). Check out past polls.