When the .pm file will not be in the same directory as the main script, I'm fond of using the lib pragma.
When the .pm file will be in the same directory as the main script, it is sometimes easier to skip the package declaration in the module. This will place everything from the module in the "main" package namespace. This is not a good idea for code that will be used in a variety of projects, but may be useful when intended for a group of related scripts that share code.
In reply to Re: perl beginner question
by eye
in thread perl beginner question
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |