Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

Re: Using HTML::TableExtract

by tfrayner (Curate)
on Aug 30, 2002 at 18:18 UTC ( #194209=note: print w/replies, xml ) Need Help??

in reply to Using HTML::TableExtract

Hi, Okay, coming rather late (about a year) to the discussion...

I can't bear to see a thread go unfinished, especially when I've blatantly copied the original poster's code and edited it into working (the example web site used below is of personal interest to me and my loved ones):

#!/usr/bin/perl -w use strict; use LWP::UserAgent; use HTTP::Request; use HTML::TableExtract; my $ua = LWP::UserAgent->new(timeout => 10); my $url = ' +func=browse'; my $request = HTTP::Request->new('GET',$url); my $response = $ua->request($request); if ($response->is_success){ my $te = new HTML::TableExtract( headers => ['Request ID','Summary +'] ); $te->parse($response->content); foreach my $ts ($te->table_states) { foreach my $row ($ts->rows) { print (join("\t", @$row)."\n"); } } } else { print "Error: ".$response->status_line."\n"; }
N.B. this node isn't worth ++ing; it would only encourage this kind of behaviour :-)


Replies are listed 'Best First'.
Re^2: Using HTML::TableExtract
by Anonymous Monk on Nov 26, 2012 at 21:36 UTC
    beautiful! (a decade later!)

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://194209]
[erix]: oh well, it's holy week, right? Thick-skin week. I just read that in the Philippines, some RCs practice self-crucifixion. Tough cookies I'd like to see
[LanX]: already?
[erix]: I don't know really. I thought so.
[LanX]: April 16th
[erix]: ah no, 16 april. some time to go yet :)
[LanX]: I hate resurrection ... my back aches
erix practices self-crucifixion but keeps getting get stuck at the one loose hand stage...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (12)
As of 2017-03-23 09:02 GMT
Find Nodes?
    Voting Booth?
    Should Pluto Get Its Planethood Back?

    Results (285 votes). Check out past polls.