Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: two statements in or

by poolpi (Hermit)
on Jun 26, 2009 at 12:59 UTC ( [id://775044]=note: print w/replies, xml ) Need Help??


in reply to two statements in or

See autodie

eval { use autodie; open( my $fh, '<', $my_file ); # ... close($fh); }; if ( $@ and $@->isa('autodie::exception') ) { if ( $@->matches('open') ) { print "Error from open\n"; # ... } } else { # open OK... }


hth,
PooLpi

'Ebry haffa hoe hab im tik a bush'. Jamaican proverb

Replies are listed 'Best First'.
Re^2: two statements in or
by Anonymous Monk on Jun 26, 2009 at 15:09 UTC
    open ... or do{ .. }; open ... or ..., ...;

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (2)
As of 2026-02-18 00:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.