#!/usr/bin/perl 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"; } } print "\n#######################\n"; ## what goes here if I want to dump table_1 ? ## it appends, not resetting $te->parse($table_1); foreach my $ts ($te->tables) { print "Table (", join(',', $ts->coords), "):\n"; foreach my $row ($ts->rows) { print join(',', @$row), "\n"; } }