HTML-TableExtract - Re: How to extract a column using HTML::TableExtract

Posted on Tue May 15 17:50:06 2007 by raprice in response to 5130 (See the whole thread of 3)
Re: How to extract a column using HTML::TableExtract

I got the following feedback in another forum and thought I would post the response for posterity. The code works for extracting columns.

It looks like you need to call method columns from a HTML::TableExtract::Table object and not a HTML::TableExtract object. Maybe something like this could get you started:
my $table = HTML::TableExtract->new(keep_html=>0, depth => 1, count => 1, br_translate => 0 ); $table->parse($html); my $t = $table->table(1,1); foreach my $col ($t->columns) { print join("\t", @$col), "\n"; }
Write a response