On Aug 13, 2007, at 9:29 AM, Jeff Pang wrote:

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

Do you want some code executed if the program dies? If that's the case assign a coderef to $SIG{__DIE__}:

  $SIG{__DIE__} = sub {
      my $message = shift;
      ...
  };

See %SIG in perlvar, and see the bottom of perldoc -f die.

-- fxn


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to