Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Perl Beginners Cgi > die and exit
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 2 Topic 1412 of 1496
Post > Topic >>

die and exit

by pangj@[EMAIL PROTECTED] (Jeff Pang) Aug 13, 2007 at 03:26 AM

Does die call exit when it's excuted?
If so,when I overwrote exit() function in my script,would die call this
customized exit?

I gave a test,but didn't see die calling exit distinctly.

This works as I wanted:
use strict;
use warnings;

sub exit {
    print "test exit";
    exit;
}

&exit;


But this won't:
use strict;
use warnings;

sub exit {
    print "test exit";
    exit;
}

die;


Glad to hear any words from you.

--
Jeff Pang <pangj@[EMAIL PROTECTED]
>
http://home.arcor.de/jeffpang/
 




 2 Posts in Topic:
die and exit
pangj@[EMAIL PROTECTED]   2007-08-13 03:26:52 
Re: die and exit
noreply@[EMAIL PROTECTED]  2007-08-15 15:33:27 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Nov 22 10:28:51 CST 2008.