In Perl, how can I find out if my file is being used as a module or run as a script?
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 main() method and doing a main() unless(<some condition which tests if I'm being used as a module>); But I forgot what the condition was. Searching Google hasn't turned...