Try FindBin, it will create the absolute path to the directory where the script is run, and make it accessible in the variable $FindBin::Bin. Eg:
#! /usr/bin/perl use FindBin; use lib "$FindBin::Bin/../moduledir"; use My::Module; my $lister = My::Module->new(); . . .
Where moduledir is where I place my own code (big surprise :). This solved similar problems for me.
Hope this helps!
pernod
--
Mischief. Mayhem. Soap.
In reply to Re: Require a script not found in @INC array
by pernod
in thread Require a script not found in @INC array
by TJD
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |