die and exit

[email protected] (Jeff Pang)
Newsgroups perl.beginners.cgi
Message-ID <23810146.1186990012989.JavaMail.root@elwamui-little.atl.sa.earthlink.net>
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 <[email protected]>
http://home.arcor.de/jeffpang/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.