canguro has asked for the wisdom of the Perl Monks concerning the following question:
Again, any help would be greatly appreciated.#!/usr/bin/perl use warnings; use strict; use LWP::Simple; use HTML::TableExtract; my $url; $url="http://www.earnings.com/fin/earnListing.jsp?tckr=&exch=&eff=&dat +e=2003-05-04"; my $content=get $url; my $te = new HTML::TableExtract( headers => [qw(Company Symbol Estimate Actual)] ); $te->parse($content); # Examine all matching tables foreach my $ts ($te->table_states) { print "Table (", join(',', $ts->coords), "):\n"; foreach my $row ($ts->rows) { print join(',', @$row), "\n"; } }
edited: Mon May 12 14:17:10 2003 by jeffa - code tags, title change (was: This Newbie Needs Perl Monks Help In Displaying Web Table Data Properly)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Displaying Web Table Data Properly
by Jaap (Curate) on May 12, 2003 at 11:16 UTC | |
|
Re: Displaying Web Table Data Properly
by Util (Priest) on May 12, 2003 at 13:02 UTC | |
by canguro (Novice) on May 12, 2003 at 21:18 UTC | |
|
Re: Displaying Web Table Data Properly
by Abstraction (Friar) on May 12, 2003 at 12:27 UTC | |
by canguro (Novice) on May 12, 2003 at 21:11 UTC |