This can be done several ways (as usual). For example:
open(LOK, ">>/non-existing/file") || my_subroutine($!); sub my_subroutine { print "Oh no! Error: ".shift; }
In reply to Re: Calling a custom sub on failure
by b10m
in thread Calling a custom sub on failure
by Red_Dragon
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |