in reply to How to use a .pm file in a .pl file in another directory.

Hi,

For a local library directory I use the following. It relies on a lib directory existing within your project. i.e. /your/project/lib

use FindBin qw($Bin); use lib "$Bin/lib";

You can then create your modules within this directory. i.e. /your/project/lib/Foo/Blah.pm Then in your code use it like

use FindBin qw($Bin); use lib "$Bin/lib"; use Foo::Blah

Have fun !!

-Kiel R Stirling

Replies are listed 'Best First'.
Re^2: How to use a .pm file in a .pl file in another directory.
by tommyxd (Acolyte) on Jan 30, 2012 at 19:31 UTC

    I'll give that a shot as well, thanks, Kiel! :)