Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

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... }


hth,
PooLpi

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


Comment on Re: two statements in or
Download Code
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
Node Status?
node history
Node Type: note [id://775044]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (12)
As of 2014-09-17 09:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (70 votes), past polls