Hi Michael,

On Wed, Jul 11, 2001 at 02:54:34PM -0700, Michael Dube ([EMAIL PROTECTED]) spew-ed 
forth:
> I have a couple of PERL installations on my system.  How do I point perl at
> the correct set of modules?  I tried setting @INC inline in my program, but
> that did not work.

To do this within your script use the lib pragma (perldoc lib):

use lib qw(/path /another/path);

To do it more permanantly, you can recompile perl. You can also set the
PERL5OPT environment variable (below work on my box running ksh, YMMV):

# PERL5OPT='-I/tmp -I/foo'; export PERL5OPT;
# perl -wle 'print join "\n", @INC';
/tmp
/foo
/usr/local/lib/perl5/5.6.0/i386-freebsd
/usr/local/lib/perl5/5.6.0
/usr/local/lib/perl5/site_perl/5.6.0/i386-freebsd
/usr/local/lib/perl5/site_perl/5.6.0
/usr/local/lib/perl5/site_perl/5.005/i386-freebsd
/usr/local/lib/perl5/site_perl/5.005
/usr/local/lib/perl5/site_perl
.

Cheers,
Kevin

-- 
[Writing CGI Applications with Perl - http://perlcgi-book.com]
"As the fletcher whittles and makes straight his arrows, so the master directs
his straying thoughts." 
        -- Buddha

Reply via email to