[H-GEN] How do I specify a path in a Perl program

s4565 at lycos.co.uk s4565 at lycos.co.uk
Mon May 13 04:54:00 EDT 2002

[ Humbug *General* list - semi-serious discussions about Humbug and     ]
[ Unix-related topics. Posts from non-subscribed addresses will vanish. ]

Thanks for the reply Jason.

On Mon, May 13, 2002 at 07:34:08PM +1000, Jason Henry Parker wrote:
> The answer is right in front of you.  The error message from Perl is
> reporting the contents of the @INC array, which is a list of
> directories searched for modules imported with the C<use> statement
> (among others).

I thought it was, however my perl knowledge is somewhat lacking.

> There are quite a few ways to change @INC, the most notable being the
> perl -I option (see perldoc perlrun) or the C<lib> pragma (see
> perldoc lib).
> > I have HTML/Entities.pm on my system
> > [root at ringo rpms]# ls -l
> > /usr/lib/perl5/vendor_perl/5.6.1/i386-linux/HTML/Entities.pm -r--r--r--    1 root     root        11359 Nov  6  2001 /usr/lib/perl5/vendor_perl/5.6.1/i386-linux/HTML/Entities.pm
> In your case you should add the
> /usr/lib/perl5/vendor_perl/5.6.1/i386-linux directory to @INC, I
> believe.  Something like this
>         use lib '/usr/lib/perl5/vendor_perl/5.6.1/i386-linux';
> before the C<use> statement that imports HTML::Entities should do the
> trick.

It certainly did the trick.  Now onto the next problem!



* This is list (humbug) general handled by majordomo at lists.humbug.org.au .
* Postings to this list are only accepted from subscribed addresses of
* lists 'general' or 'general-post'.  See http://www.humbug.org.au/

More information about the General mailing list