in reply to Question on extracting HTML tables with HTML::TableExtract

Once you have the table, you can build a tree and then call $table_tree->as_HTML:
use HTML::TableExtract qw(tree); my $te = HTML::TableExtract->new(); $te->parse($string_of_html); my $table = $te->first_table_found; my $table_tree = $table->tree; my $table_html = $table_tree->as_HTML; print $table_html;
You can also call tables() to get a list of all the tables and then put a loop around the above.

You need to have the optional HTML::TreeBuilder and HTML::ElementTable installed for this to work.