ajay.awachar has asked for the wisdom of the Perl Monks concerning the following question:
Following is the Result I'm getting from above code.#!/usr/bin/perl use strict; use LWP::UserAgent; use LWP::Simple; ## set URL my $url = "http://google.com"; my $ua = LWP::UserAgent->new(); my $res = $ua->get($url); $res->content_type('text/html'); my $response = $res->content; print "Response Type = ".$res->content_type; print "\nResponse Status ".$res->status_line." Res code "; ## view print "\nResponse = $res->content \n";
Response Type = text/html Response Status 200 OK Res code Response = HTTP::Response=HASH(0x8401064)->content
How can I get the actual text content?Please Help.
Thanks
-Ajay
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Checking contents of fetched URL.
by holli (Abbot) on Jan 29, 2010 at 22:54 UTC | |
by ajay.awachar (Acolyte) on Jan 29, 2010 at 23:43 UTC | |
by Anonymous Monk on Jan 30, 2010 at 16:18 UTC | |
|
Re: Checking contents of fetched URL.
by ikegami (Patriarch) on Jan 29, 2010 at 23:43 UTC | |
|
Re: Checking contents of fetched URL.
by blakew (Monk) on Jan 30, 2010 at 07:39 UTC | |
|
Re: Checking contents of fetched URL.
by Anonymous Monk on Jan 29, 2010 at 22:51 UTC |