Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^2: exit this way

by ExReg (Priest)
on Aug 31, 2015 at 21:58 UTC ( [id://1140573]=note: print w/replies, xml ) Need Help??


in reply to Re: exit this way
in thread exit this way

Thanks. This was my thought on the matter.

Replies are listed 'Best First'.
Re^3: exit this way
by Your Mother (Archbishop) on Aug 31, 2015 at 22:14 UTC

    Well, you’re right. Right in the same way that there is no particular reason use strict; is necessary to working code. An exit; or exit 0; between your code and your subs is an excellent practice and can prevent goofy and accidental bugs.

      I've never heard this before, but I'm always open to change my understanding/belief when something better comes along. Do you have any of these particular issues in mind that you speak of?

        Just what I said; completeness, avoiding accidental code being run somewhere left out, separation of concerns in the script, you know where the main logic ends without reading 1,000 lines of subroutines; I’ve been doing it for 15 years and it’s served me well. Consider closing filehandles—unnecessary, but also a good idea.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (8)
As of 2024-04-23 13:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found