hOURS wrote:
The get function in the libwww-perl library would be really useful to
me, but I'm having problems making it work. When I use it in a
cgi script (it's ultimate destination) it fails. My browser
displays a generic error message which isn't very helpful.
Unless you don't have access to the web server's error log, you may want
to add
use CGI::Carp 'fatalsToBrowser';
to the beginning of the script.
Trying
to figure this out I ran a script with get from my own computer.
I have two versions of Perl, 5.6 and 5.8. When I use the former,
downloaded from the cd that comes with the book Perl for Dummies,
3rd edition. It works as advertised. But when I use the
later version of Perl, downloaded off a website, I get the following
message:
Can't locate LWP/Simple.pm in @INC (@INC contains: .)
@INC contains only the current directory, which indicates that Perl 5.8
was not properly installed.
Is the library something I would have had to download separately when I
upgraded to 5.8?
Not necessarily. Adding something like this before "use LWP::Simple"
might help:
use lib 'C:/perl/lib';
(or whatever the path is to your 5.6 library)
Could the folks who host my website simply not have the library?
That seems odd. It's kind of basic, isn't it?
Even if libwww-perl is not among the standard modules, I believe it's
included in most Perl distributions.
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/