Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: different between die and exit

by djp (Hermit)
on Feb 24, 2009 at 06:19 UTC ( #745909=note: print w/ replies, xml ) Need Help??


in reply to different between die and exit

Also, die (by default unless caught) returns a non-zero exit status to the operating system, whereas exit (by default) returns a zero exit status.

Update: corrected as per ikegami's comment.


Comment on Re: different between die and exit
Re^2: different between die and exit
by ikegami (Pope) on Feb 24, 2009 at 07:18 UTC

    It makes no sense to talk of "by default" for die. There's no argument to specify the exit code, so it can't be omitted to use the default.

    Also, die always returns non-zero ($! || ($?>>8) || 255).

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (9)
As of 2014-08-22 22:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (168 votes), past polls