jayanth has asked for the wisdom of the Perl Monks concerning the following question:
When I run this code, I get the message '500 Can't connect to www.google.com:80 (Bad hostname 'www.google.com')'.#!/usr/bin/perl use LWP::UserAgent; print "Content-type: text/html\n\n"; my $ua = new LWP::UserAgent(); my $url = 'http://www.google.com/'; my $httpresp = $ua->get($url); print $httpresp->content;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Using LWP::UserAgent to Get Web Pages
by Popcorn Dave (Abbot) on Jun 14, 2007 at 15:54 UTC | |
|
Re: Using LWP::UserAgent to Get Web Pages
by pajout (Curate) on Jun 14, 2007 at 15:25 UTC | |
|
Re: Using LWP::UserAgent to Get Web Pages
by moritz (Cardinal) on Jun 14, 2007 at 18:27 UTC | |
|
Re: Using LWP::UserAgent to Get Web Pages
by naikonta (Curate) on Jun 15, 2007 at 01:56 UTC | |
|
Re: Using LWP::UserAgent to Get Web Pages
by varian (Chaplain) on Jun 15, 2007 at 07:48 UTC | |
|
Re: Using LWP::UserAgent to Get Web Pages
by jayanth (Initiate) on Jun 16, 2007 at 16:03 UTC | |
by Anonymous Monk on Jun 17, 2007 at 02:20 UTC | |
by jayanth (Initiate) on Jun 18, 2007 at 16:52 UTC |