in reply to Re^2: why did i die?
in thread why did i die?

you could check something like the errno in '$!' to distinguish.

> I do not know what code is ran inside the eval.

well then you'll probably also need a block-eval around the string eval.

Cheers Rolf

( addicted to the Perl Programming Language)

Replies are listed 'Best First'.
Re^4: why did i die?
by markov (Scribe) on Apr 02, 2014 at 09:31 UTC

    The $! will only be set when the die() is related to a failing operating system call (for instance open()). That does not work in cases like:

    defined $filename or die "no filename given";