in reply to trapping exit() calls with %SIG
I'm trying to define an event to be performed whenever the program exits normally
Aforementioned END is definitely the way to go. To have your code only execute when the program exits normally, use a flag.
just put your cleanup code (or a call to your cleanup code) at the end of the program.
Update: It's silly to both use END and to require code at the end of the program.
|
|---|