For Programmers: Free Programming Magazines  


Home > Archive > PERL Beginners > December 2006 > PERL not compiling -HTTP.pm Module ????









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author PERL not compiling -HTTP.pm Module ????
vickyveeranna@gmail.com

2006-12-15, 6:59 pm

Hello every time I run this code
#!/usr/bin/perl
print "Content-Type: text/html\n\n";

use CGI::Carp qw(fatalsToBrowser);
use LWP::UserAgent;

$ua = LWP::UserAgent->new;
$ua->agent("$0/0.1 " . $ua->agent);
$ua->agent("Mozilla/8.0");
$url = 'http://dtrade01';
$req = HTTP::Request->new(GET => $url );
$req->header('Accept' => 'text/html');
$res = $ua->request($req);
if ($res->is_success) {
print $url."<br />";
$text = $res->content;
} else {
print "8::" . $res->status_line . "\n";
}

I get message saying
8::501 Protocol scheme 'http' is not supported
What is this message related to ? UserAgent? Firewall?
Thanks

usenet@DavidFilmer.com

2006-12-16, 7:59 am

vickyveeranna@gmail.com wrote:

> I get message saying
> 8::501 Protocol scheme 'http' is not supported


I think this question gets asked every few months (as I'm sure Google
would indicate).

The usual answer is that LWP is not installed properly (using 'make
install'). Try a manual reinstall of libwww-perl, and be sure to 'make
test' and 'make install'

--
David Filmer (http://DavidFilmer.com)

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com