use HTML::TableExtract qw(tree); $te = HTML::TableExtract->new( headers => [qw(Date Notifier H M R L Domain OS View)] ); $te->parse_file($html_file); $table = $te->first_table_found; $table_tree = $table->tree; $table_html = $table_tree->as_HTML; $table_text = $table_tree->as_text; $document_tree = $te->tree; $document_html = $document_tree->as_HTML;