Wrap the immortal code in an eval. When it hits die(), the eval() exits and you get the text in $@. Run perldoc -f eval for more details.
To get a bit fancier, setup a %SIG signal handler to catch (and ignore) die.
And no intro to immortality is complete without mentioning that no scheme is 100% reliable. If someone wants to kill -9, $$ then you are going down in flames.
- doug
In reply to Re: is there a way to avoid dieing ?
by doug
in thread is there a way to avoid dieing ?
by palkia
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |