use HTML::TableExtract;
$te = HTML::TableExtract->new( headers => [qw(Date Price Comments)] );
$te->parse($html_string);
# Examine all matching tables
foreach $ts ($te->tables) {
print "Table (", join(',', $ts->coords), "):\n";
foreach $row ($ts->rows) {
print join(',', @$row), "\n";
}
}
####
| Date | Price | Comments |
| 21/9 | 2324 | abc |
| 21/9 | 2324 | abasdasc |
| 21/9 | 2324 | absadsadsc |
####
dkfjskdjfskfd, 21/9, 2324, abc
dkfjskdjfskfd1, 21/9, 2324, abasdasc
dkfjskdjfskfdsdfsdf2, 21/9, 2324, absadsadsc