Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^3: why did i die?

by LanX (Saint)
on Apr 02, 2014 at 09:27 UTC ( [id://1080715]=note: print w/replies, xml ) Need Help??


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";

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1080715]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (4)
As of 2024-04-25 20:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found