Pardon me if this is a stupid question. I'm kinda new at Perl. I'm trying to run a Perl script that uses the LWP library and have been getting a strange error. LWP was recently installed on this older Perl (5.005) and now it can't seem to find LWP. My host attempted a Perl 5.6 installation and failed miserably at it so it's either get LWP working with 5.005 or (shudder) find a PhP solution. Any suggestions would be greatly appreciated.
Here's the start of my script.
#!/usr/bin/perl
#
#-----
#comment lines snipped
#-----
use LWP::Simple;
use LWP::UserAgent;
-------------------------------------
Here's the error we're getting:
Can't locate LWP/Simple.pm in @INC (@INC contains: /usr/libdata/perl/5.00503/mach /usr/libdata/perl/5.00503 /usr/local/lib/perl5/site_perl/5.005/i386-freebsd /usr/local/lib/perl5/site_perl/5.005 .) at /nfs/home/d/u/dunsel/public_html/cgi-bin/odp/odp.pl line 9.
BEGIN failed--compilation aborted at /nfs/home/d/u/dunsel/public_html/cgi-bin/odp/odp.pl line 9.
[Fri Jan 5 18:39:04 2001] [error] [client 198.77.208.4] Premature end of script headers: /nfs/home/d/u/dunsel/public_html/cgi-bin/odp/odp.pl
----------------------------------------
Here's the directory with Simple.pm
> root@uws1:/usr/local/lib/perl5/site_perl/5.005/LWP
> total 62
> drwxr-xr-x 4 root wheel 512 Jan 5 18:36 .
> drwx------ 16 root wheel 512 Jan 5 23:55 ..
> drwxr-xr-x 2 root wheel 512 Jan 5 18:36 Authen
> -r--r--r-- 1 root wheel 3104 Dec 2 1997 Debug.pm
> -r--r--r-- 1 root wheel 7036 Nov 16 1999 MediaTypes.pm
> -r--r--r-- 1 root wheel 900 Dec 2 1997 MemberMixin.pm
> drwxr-xr-x 2 root wheel 512 Jan 5 18:36 Protocol
> -r--r--r-- 1 root wheel 7982 Apr 9 2000 Protocol.pm
> -r--r--r-- 1 root wheel 6932 Apr 9 2000 RobotUA.pm
> -r--r--r-- 1 root wheel 8069 May 24 2000 Simple.pm
> -r--r--r-- 1 root wheel 20137 Jun 1 2000 UserAgent.pm
> -r--r--r-- 1 root wheel 2828 Nov 11 1996 media.types
> root@uws1:/usr/local/lib/perl5/site_perl/5.005/LWP
---------------------------------------------------------
And here's a dump of my hosts re-install of LWP thinking it was bad.
> root@xxx1:~# perl -MCPAN -e 'install Bundle::LWP'
> Going to read /home/nbd/.cpan/sources/authors/01mailrc.txt.gz
> CPAN: Compress::Zlib loaded ok
> Going to read
> /home/nbd/.cpan/sources/modules/02packages.details.txt.gz
> Going to read /home/nbd/.cpan/sources/modules/03modlist.data.gz
> URI is up to date.
> Net::FTP is up to date.
> MIME::Base64 is up to date.
> Digest::MD5 is up to date.
> HTML::HeadParser is up to date.
> LWP is up to date.
The directory above LWP appears to be in Perl's search path which I though was all that was needed. LWP is installed and the uses statement is right... what are we doing wrong. Please explain in details I'm still a Perl neophyte.
Thanks for any help you can give.
Here's the start of my script.
#!/usr/bin/perl
#
#-----
#comment lines snipped
#-----
use LWP::Simple;
use LWP::UserAgent;
-------------------------------------
Here's the error we're getting:
Can't locate LWP/Simple.pm in @INC (@INC contains: /usr/libdata/perl/5.00503/mach /usr/libdata/perl/5.00503 /usr/local/lib/perl5/site_perl/5.005/i386-freebsd /usr/local/lib/perl5/site_perl/5.005 .) at /nfs/home/d/u/dunsel/public_html/cgi-bin/odp/odp.pl line 9.
BEGIN failed--compilation aborted at /nfs/home/d/u/dunsel/public_html/cgi-bin/odp/odp.pl line 9.
[Fri Jan 5 18:39:04 2001] [error] [client 198.77.208.4] Premature end of script headers: /nfs/home/d/u/dunsel/public_html/cgi-bin/odp/odp.pl
----------------------------------------
Here's the directory with Simple.pm
> root@uws1:/usr/local/lib/perl5/site_perl/5.005/LWP
> total 62
> drwxr-xr-x 4 root wheel 512 Jan 5 18:36 .
> drwx------ 16 root wheel 512 Jan 5 23:55 ..
> drwxr-xr-x 2 root wheel 512 Jan 5 18:36 Authen
> -r--r--r-- 1 root wheel 3104 Dec 2 1997 Debug.pm
> -r--r--r-- 1 root wheel 7036 Nov 16 1999 MediaTypes.pm
> -r--r--r-- 1 root wheel 900 Dec 2 1997 MemberMixin.pm
> drwxr-xr-x 2 root wheel 512 Jan 5 18:36 Protocol
> -r--r--r-- 1 root wheel 7982 Apr 9 2000 Protocol.pm
> -r--r--r-- 1 root wheel 6932 Apr 9 2000 RobotUA.pm
> -r--r--r-- 1 root wheel 8069 May 24 2000 Simple.pm
> -r--r--r-- 1 root wheel 20137 Jun 1 2000 UserAgent.pm
> -r--r--r-- 1 root wheel 2828 Nov 11 1996 media.types
> root@uws1:/usr/local/lib/perl5/site_perl/5.005/LWP
---------------------------------------------------------
And here's a dump of my hosts re-install of LWP thinking it was bad.
> root@xxx1:~# perl -MCPAN -e 'install Bundle::LWP'
> Going to read /home/nbd/.cpan/sources/authors/01mailrc.txt.gz
> CPAN: Compress::Zlib loaded ok
> Going to read
> /home/nbd/.cpan/sources/modules/02packages.details.txt.gz
> Going to read /home/nbd/.cpan/sources/modules/03modlist.data.gz
> URI is up to date.
> Net::FTP is up to date.
> MIME::Base64 is up to date.
> Digest::MD5 is up to date.
> HTML::HeadParser is up to date.
> LWP is up to date.
The directory above LWP appears to be in Perl's search path which I though was all that was needed. LWP is installed and the uses statement is right... what are we doing wrong. Please explain in details I'm still a Perl neophyte.
Thanks for any help you can give.