in reply to Calling a custom sub on failure
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; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Calling a custom sub on failure
by Red_Dragon (Beadle) on Jan 14, 2004 at 22:03 UTC |