use strict;
use HTML::TableExtract;
use Perl6::Slurp;
my $html_string = slurp('/Users/ilia/Desktop/BMO_summary.html');
my $te = HTML::TableExtract->new( subtables=> 1, attribs => { cellspacing => 1, cellpadding =>1 } );
$te->parse($html_string);
# Examine all matching tables
foreach my $ts ($te->tables) {
print "Table (", join(',', $ts->coords), "):\n";
foreach my $row ($ts->rows) {
print join(',', @$row), "\n";
}
}
print "-----\n";
my $table = $te->table(3,1);
foreach my $row ( $table->rows() ) {
print join(',', @$row), "\n";
}