This is called "exception handling" (among other names). The modern way of performing this is to use any of the "Try" modules - I find that Try::Tiny is a good place to start. Older code might rely more heavily on eval which is not without its problems, hence the "Try" modules.
If you are familiar with exception handling from other languages where it is built in, you should have no problems with it in Perl.
In reply to Re: How to send the "die" output to e-mail.
by hippo
in thread How to send the "die" output to e-mail.
by pmu
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |