in reply to Calling Subroutines of package from another program?

As noted in perldoc perlmod, Perl code using the .pm file-extension can be placed into “packages” that can then be incorporated into other programs by means of the use and/or the require directives.

Perl locates these modules by iterating through the special array, @INC, which can be influenced in a number of ways:

  1. The use lib directive.
  2. The PERL5LIB or PERLLIB environment variables.
  3. A built-in list whose contents are established when the Perl executable is first compiled.
  4. Manual manipulation of the list in the usual way ... it is just an ordinary list variable.
You can view the content of this list (among other things) at any time by typing the command:   perl -V (note the uppercase “V”).

“I intend this to be only a superficial glossing-over of the very substantial information to be found in perldoc perlmod, and is to this resource that I now direct your attention ...” he concluded, with a pointed and obviously-meaningful stare.