#!/usr/bin/perl
use strict;
use warnings;
use LWP;
print "Content-type: text/html\n\n";
my $browser = LWP::UserAgent->new;
my $url = "http://www.google.com";
my $response = $browser->get($url);
my $html = $response->content;
print $html;
我无法使用LWP获取html的内容。 它正在工作localhost但linux服务器无法正常显示错误'
500 Can't connect to www.google.com:80 (Bad hostname 'www.google.com')
请帮忙修复错误?