Sure. A perl module is actually run when it is
used or
required, and these functions will check the return value. So a sophisticated module can check for problems, and indicate them by return a false value.
If you're not checking for errors, all you need to do is make sure to return a true value, which is typically done by adding this to the end:
Another note: generally, .pl indicates a script that actually does something, whereas .pm (for Perl Module) indicates a collection of related subs.
Recommended reading about perl modules. Especially, see the notes on the distinction between
use and
require. That whole site is very nice, of course, it is really just a copy of all the excellent documentation by typing: