cfreak has asked for the wisdom of the Perl Monks concerning the following question:
To end this code the user is forced to use CTRL-C but the print statement never happens. Am I reading the docs wrong and missing something. Is there a better way to execute some code if the program stops before I want it to? Thanks in advance#!/usr/bin/perl use strict; while(1) { } END { print "Hello from the END block\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
•Re: END {} not executing
by merlyn (Sage) on Mar 24, 2002 at 23:55 UTC | |
|
Re: END {} not executing
by Dog and Pony (Priest) on Mar 24, 2002 at 22:19 UTC | |
|
Re: END {} not executing
by zengargoyle (Deacon) on Mar 24, 2002 at 22:08 UTC |