use HTML::TableExtract qw(tree); my $te = HTML::TableExtract->new(); my $table = $te->first_table_found(); # $table is an HTML::ElementTable structure # ... maybe edit the tree structure here print $table->as_HTML;