use HTML::TableExtract; my $te = HTML::TableExtract->new(keep_html => 1); my $table = $te->first_table_found(); foreach my $row ($table->rows) { foreach my $cell (@$row) { ... maybe edit html text } }