There are a couple of ways depending on what you're trying to do:
Perl has a '-I' pararamter which allows additional libraries to be included like this:
Perl -I "root/cgi-bin/csr" myProgram.pl
For those on Windows, beware that ActiveState Perl 5.005_3 has a bug that causes paths to be chopped at the first space.
or if you don't want (or can't) pass parameters you probably want this:
use 'root/cgi-bin/csr';
as a last resort you might try:
BEGIN { push @INC, 'root/cgi-bin/csr' };
The BEGIN block is executed before the rest of the program.
Have fun,
Carl Forde |