IT Community - Software Programming, Web Development and Technical Support

difference between die and exit in perl

This is a discussion on difference between die and exit in perl within the Perl forums, part of the Software Development category; Hi please tell me the difference between die and exit in perl?...


Go Back   IT Community - Software Programming, Web Development and Technical Support > Software Development > Perl

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 05-22-2007, 03:54 AM
vigneshgets vigneshgets is offline
D-Web Genius
 
Join Date: Mar 2007
Posts: 904
vigneshgets is on a distinguished road
Arrow difference between die and exit in perl

Hi please tell me the difference between die and exit in perl?
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 07-12-2007, 10:49 PM
Gopisoft Gopisoft is offline
D-Web Sr.Programmer
 
Join Date: Feb 2007
Posts: 117
Gopisoft is on a distinguished road
Default Re: difference between die and exit in perl

Hi,

die :Outside an eval, prints the value of LIST to STDERR and exits with the current value of $! (errno).

exit : Evaluates EXPR and exits immediately with that value.
This universally recognized values for EXPR are 0 for success and 1 for error.
Don't use exit in subroutine.

-R.Gopi
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Getting started with PERL Murali Perl 3 10-04-2008 11:37 PM
what is perl? inder Perl 2 09-25-2008 05:10 AM
How to set Perl Interpreter within perl script sivaramakrishnan Perl 1 07-19-2007 06:45 AM
When would you not use Perl for a project? vadivelanvaidyanathan Perl 0 07-15-2007 07:24 PM
Perl? swoosh Perl 2 03-19-2007 04:31 AM


All times are GMT -7. The time now is 02:04 PM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.

SEO by vBSEO 3.0.0