Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
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
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
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 chilling in the Monastery: (8)
As of 2015-07-08 04:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (94 votes), past polls