Let\'s say I have a Perl file in which there are parts I need to run only when I\'m called as a script. I remember reading sometime back about including those parts in a mai
I call these things "modulinos" originally in my Scripts as Modules article for The Perl Journal (now Dr. Dobbs). Google that term and you get the right resources. Sinan already linked to my development sources for one of my books where I talk about it. You might also like How a Script Becomes a Module.