⭐ in reply to how do i trap the error generated by perl
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 $@;
|
|---|