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.