For Programmers: Free Programming Magazines  


Home > Archive > PERL Miscellaneous > November 2004 > 500 Can't connect to search.cpan.org:80 (Bad protocol 'tcp') at web.pl









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 500 Can't connect to search.cpan.org:80 (Bad protocol 'tcp') at web.pl
Nirvana

2004-11-27, 3:56 pm

#!C:/Perl/bin/perl.exe -w

use LWP::Simple;
use HTML::Parse;
use HTML::Element;
use HTML::Parser;
use HTML::FormatText;
use Socket;

$ENV{"SYSTEMROOT"} = "C:/WINDOWS/system32";

require LWP::UserAgent;

my $ua = LWP::UserAgent->new;
$ua->timeout(10);
$ua->env_proxy;

my $response = $ua->get('http://search.cpan.org/');

if ($response->is_success) {
print $response->content; # or whatever
}
else {
die $response->status_line;
}

I'm getting following error:
500 Can't connect to search.cpan.org:80 (Bad protocol 'tcp') at web.pl
line 24.

Any help ?

Sponsored Links







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

Copyright 2008 codecomments.com