use Data::Dumper; use strict; use warnings; use HTML::TableExtract; my $te = HTML::TableExtract->new(headers => ['Name', 'Phone Number']); $te->parse("" . "" . "
NamePhone Number
Tom1234
Mary4321
"); foreach my $ts ($te->table_states) { print "Table (", join(',', $ts->coords), "):\n"; foreach my $row ($ts->rows) { print join(',', @$row), "\n"; } } #### Table (0,0): Tom,1234 Mary,4321