in reply to system() in DESTROY bug?
Basically, you can't. This is the bane of global variables. Also see local $@ has an unwanted side effect for a different yet similar problem.
I guess you could set up a combination of $SIG{__DIE__} handler and resource allocation object to "restore" whatever exit code you find suitable, but the basic problem will persist.
|
|---|