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

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.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://448036]
help
Chatterbox?
marioroy Updated Re^3: RFC: Compiling Gtk+ stack on windows with strawberry perl. Also tested Gtk2 installation on Strawberry Perl v5.22.3.1. Installing Tk and Tk::Zinc works fine on Perl v5.22.3.1.
[marioroy]: Hi karlgoethebier. Folks can comment feasibly if asking the review via a meditation (imho).
[marioroy]: karlgoethebier Ah, am not sure if tiny meditation or a cool use. ;-)

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2017-09-24 09:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    During the recent solar eclipse, I:









    Results (273 votes). Check out past polls.

    Notices?