The use statement searches a module in @INC. The lib pragma adds directories to @INC. So you will likely want to tell Perl (for this script) to also look elsewhere for your code:
use lib '../foo';
If you have a directory with modules that you always want to use, you can set $ENV{PERL5LIB} (or was it $ENV{PERL5INC} ?). If you only want to alter the module search path for one invocation of your program, you can invoke it as:
perl -I../foo my_script.pl
In reply to Re: using a file in a different dir
by Corion
in thread using a file in a different dir
by Delusional
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |