Accessing the web

I am pretty new to this stuff and am a little bit lost. I am trying to download some data from the web and have no idea how to print the object that comes back:
HTML::TreeBuilder=HASH(0x9aad28)

Is there somewhere I can find some easy to use examples as well ?

My code is as follows:

use HTTP::Request;
use HTTP::Response;
use HTML::Parse;

require LWP::UserAgent;

$ua = new LWP::UserAgent;
$url = "http://www.jpmorgan.com";

my $request = new HTTP::Request('GET', $url);
my $response = $ua->request($request);

$html = parse_html($response->content);

print $html;
benwilkinsonAsked:
Who is Participating?
 
maneshrConnect With a Mentor Commented:
Heres what you need to add to the end your code...


print $html->as_HTML;  # or any other HTML::Element method
0
 
benwilkinsonAuthor Commented:
Can't argue with that. Thanks !
0
All Courses

From novice to tech pro — start learning today.