We've seen that subroutines enable you to reuse a
set of program statements at different points in
the program. What if you want to reuse a set of
program statements in different programs
entirely? For example, you might
have several different programs that need to
refer to factorials. You do this with
modules
Module syntax:
package Mymodule;
sub mysubroutine {...}
1;
A module file must have a .pm file
extension.
Calling module functions. You call a module
function like this: