[thelist] Question about perl mod's.

Andy Baio andy at kickmedia.com
Fri Jan 12 14:23:31 CST 2001


"Daniel J. Cody" wrote:
> To cut to the chase, what/who/where do I modify so that the path that
> @INC is looking in can include my custom path?

	At the beginning of your script, add a lib
	statement with the path like so:

#!/usr/bin/perl
use lib "/perl/foo/lib";
use GD;

	Or, if you want to permanently modify
	your @INC, set the PERL5LIB environment 
	variable in your shell of choice.  (This 
	is straight out of the Perl Cookbook, so
	take it or leave it.  I don't know much 
	about shell scripting.)

# syntax for sh, bash, ksh, or zsh
$ export PERL5LIB=/perl/foo/lib

# syntax for csh or tcsh
% setenv PERL5LIB /perl/foo/lib

	Good luck.

					-- Andy.




More information about the thelist mailing list