Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: exit this way ( END block will be executed )

by 1nickt (Canon)
on Sep 01, 2015 at 15:31 UTC ( [id://1140680]=note: print w/replies, xml ) Need Help??


in reply to exit this way

I'm agnostic about the many recommendations here to follow the practice your overlords are seeking to impose. But if you do so, remember that exit() doesn't always exit immediately ...

#!/usr/bin/perl use strict; use warnings; use feature qw/ say /; main(); exit(0); sub main { say 'Exiting'; } END { say 'Not done yet'; }
Output:
$ perl 1140667.pl Exiting Not done yet $

The way forward always starts with a minimal test.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1140680]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (7)
As of 2024-04-25 08:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found