Just for information, here is the True Perl Way (tm):
eval { die "screaming" }; if( $@=~ /screaming/) { print "stop screaming\n"; } print "happily going on\n";
$@ is empty ('') if the eval succeeds, otherwise it contains the error message returned by the code.
In reply to Re: Error Checking: Have you tried 'Try/Catch'?
by mirod
in thread Error Checking: Have you tried 'Try/Catch'?
by tadman
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |