HTML::TableExtract example
am 24.11.2005 00:12:45 von stevefink------=_Part_10190_31670081.1132787565877
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
Hi all,
I've completed this using regular expressions parsing out arbitrary data
between HTML tag, however I found a much more efficient route with the
HTML::TableExtract module which looks like it can very well shorten my code
and make it more manageable. I'm able to parse out the entire table with
the following code:
#!/usr/bin/perl -w -t
# Development grounds for using HTML::TableExtract for songsearch.pl
use HTML::TableExtract;
use strict;
my $html =3D 'latest_rel.htm';
my $te =3D HTML::TableExtract->new( attribs =3D> { border =3D> 1 } );
$te->parse_file($html);
foreach my $ts ($te->tables) {
foreach my $row ($ts->rows) {
print " ", join(',' , @$row), "\n";
}
}
However, now I want to extract only the second column from this table (It
just consists of several rows with three columns).
Any hints would be greatly appreciated!
Thanks and have a great holiday weekend.
--
Steve Finkelstein
stevefink@gmail.com
------=_Part_10190_31670081.1132787565877--