Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

Re: two statements in or

by poolpi (Hermit)
on Jun 26, 2009 at 12:59 UTC ( #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... }


'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?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://775044]
[virtualsue]: Nor am I :-)
[talexb]: virtualsue Heh .. long time no see! :)
[virtualsue]: I have a quiet Perl themed slack workspace
[virtualsue]: The person who talks to me on it the most *hates* Perl but she hates everything
[virtualsue]: If anyone is interested, ping me an email address for an invitation.
[virtualsue]: I welcome any talktaive people who do not mind using a propietary walled-garden service for free
[virtualsue]: or even proprietary
[virtualsue]: we talk about programming and music and stuff

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (12)
As of 2017-09-26 13:58 GMT
Find Nodes?
    Voting Booth?
    During the recent solar eclipse, I:

    Results (295 votes). Check out past polls.