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 |
In Section
Seekers of Perl Wisdom