[prog] @INC in Perl

David Sumbler david at aeolia.co.uk
Tue Apr 27 10:38:26 EST 2004


On Tue, 27 Apr 2004, Jacinta Richardson wrote:

> > In a bash script, I have used the command 'lwp-request' to get the
> > contents of a web-page.  This works fine.
> >
> > But if I add the option '-o text', I get this error message:
> >
> > Can't locate HTML/Parse.pm in @INC
> >
> > I have perl-libwww-perl-5.65-6 installed and also
> > perl-Parse-Yapp-1.05-30.  Parse.pm exists in
> > /usr/lib/perl5/vendor_perl/5.8.0/Parse/Yapp/ .
>
> First of all HTML::Parse is not the same as HTML::Parser.  You really do
> want to remove the sym-link you have put between the two.

Yes, I have already done that.

> I'm not sure why you're getting this error.  Is the full path to
> Parse.pm /usr/lib/perl5/vendor_perl/5.8.0/Parse/Yapp/HTML/Parse.pm?
> A Parse.pm in a directory not called HTML will not be considered the
> right file by Perl.

No - I have:

/usr/lib/perl5/vendor_perl/5.8.0/Parse/Yapp/Parse.pm

> I saw in another reply that you used the CPAN shell to install
> HTML::Parse.  If you can determine where that is installed I can probably
> help you further.  Hopefully it's somewhere like:
> 	/usr/lib/perl5/vendor_perl/5.8.0/HTML/Parse.pm

I have:

/usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi/HTML/Parser.pm

The only 'Parse.pm' I have is the one in
/usr/lib/perl5/vendor_perl/5.8.0/Parse/Yapp/

> If you could also let me know how exactly you're calling lwp-request
> from your bash script I can probably help you further.

lwp-request -o text 'http://www.etc'

Thanks

David

--


More information about the Programming mailing list