meonkeys has asked for the wisdom of the Perl Monks concerning the following question:
The exit() function does not always exit immediately. It calls any defined "END" routines first, but these "END" routines may not themselves abort the exit.But the following code seems to exit() out of the END{} block (I can tell because a status code of 1 is returned to the OS):
Am I missing something simple?#!/usr/bin/perl -Tw use strict; print "I'm going to exit now.\n"; exit(255); sub END { print "In END block\n"; exit(1); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: exit() calls END{} blocks, but these blocks can exit()
by Anonymous Monk on Jul 08, 2002 at 18:54 UTC | |
by meonkeys (Chaplain) on Jul 08, 2002 at 19:30 UTC | |
|
Re: exit() calls END{} blocks, but these blocks can exit()
by Zaxo (Archbishop) on Jul 08, 2002 at 19:04 UTC | |
|
Re: exit() calls END{} blocks, but these blocks can exit()
by Aristotle (Chancellor) on Jul 08, 2002 at 18:45 UTC | |
by meonkeys (Chaplain) on Jul 08, 2002 at 18:52 UTC | |
by Juerd (Abbot) on Jul 09, 2002 at 05:47 UTC |