Using eval {}; and $@ (which, if set, contains the error message that would otherwise be fatal -- see perldoc perlvar) will allow you to catch most errors:
eval { #code you want to catch errors from }; custom_error_handler($@) if $@;
In reply to Re: how do i trap the error generated by perl
by arturo
in thread how do i trap the error generated by perl
by turumkhan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |