http://qs1969.pair.com?node_id=448036


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.