in reply to Re: Re: How to detect a die() without catching it?
in thread How to detect a die() without catching it?

For this part, you can just add a "\n" to the end of the message, right? e.g.
sub blah { die "blah"; } eval {blah();}; if ($@) { die "$@\n"; } else { print "okay\n"; } # prints "blah at foo.pl line 4"
/s

Replies are listed 'Best First'.
Re: Re: Re: Re: How to detect a die() without catching it?
by samtregar (Abbot) on May 18, 2002 at 01:02 UTC
    We have a winner! This will produce exactly the behavior I'm looking for without requiring an explicit stack and nasty %SIG hackery. Thanks!

    -sam