Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

Re^2: exit or die in error handling?

by Thilosophy (Curate)
on Apr 15, 2005 at 01:10 UTC ( #448036=note: print w/ replies, xml ) Need Help??

in reply to Re: exit or die in error handling?
in thread exit or die in error handling?

They both end the program,

I think the most important difference is that die can be caught by an eval (it is Perl's way of doing exceptions) in other parts of the program, so it does not necessarily end the program. Using die thus makes code more easily reusable, and is a good habit to get into.

Comment on Re^2: exit or die in error handling?
Select or Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (6)
As of 2015-11-25 02:38 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (669 votes), past polls