use strict; use warnings; use diagnostics; use HTML::TableExtract; my $table_1 = '
foobar
bazquux
'; my $table_2 = '
bofxyzzy
batgazonk
'; my $te = HTML::TableExtract->new(); $te->parse($table_1); foreach my $ts ($te->tables) { print "Table (", join(',', $ts->coords), "):\n"; foreach my $row ($ts->rows) { print join(',', @$row), "\n"; } } ## what goes here if I want to dump table_1 ? $te->parse($table_2); foreach my $ts ($te->tables) { print "Table (", join(',', $ts->coords), "):\n"; foreach my $row ($ts->rows) { print join(',', @$row), "\n"; } }