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.
In reply to Re: system() in DESTROY bug?
by Corion
in thread system() in DESTROY bug?
by rtg
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |