Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: exit this way

by karlgoethebier (Abbot)
on Sep 06, 2015 at 19:12 UTC ( [id://1141208]=note: print w/replies, xml ) Need Help??


in reply to exit this way

"...they looked over my latest script...said that I should have an exit statement at the end, before all the subs. I do not see the need for exit..."

I've been told to do this a while ago.

If "they" insist give them their fu****g main AKA block and this exit, it doesn't hurt:

#!/usr/bin/env perl use strict; use warnings; use feature qw(say); MAIN: { say karl(); exit 0; } sub karl { qq(nose); } __END__

I hope i guessed right. Else sorry ;-) Best regards, Karl

«The Crux of the Biscuit is the Apostrophe»

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (6)
As of 2024-04-19 11:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found