use strict;
use HTML::TableExtract;
# I'm using LWP in the real code, but this is a minimalistic attempt at a working example
my $html_doc_name = '/tmp/symbols.html';
my $html_doc_string;
my $te = new HTML::TableExtract( headers => ['Character', 'Entity'] );
my $ts;
my $row;
undef $/; # the absence of this one little line always causes me so much trouble
open(HTML, $html_doc_name) or die "Couldn't open html file: $!\n";
$html_doc_string = ;
close(HTML) or die "Couldn't close html file: $!\n";
$te->parse($html_doc_string);
# Examine all matching tables
foreach $ts ($te->table_states) {
print "Table (", join(',', $ts->coords), "):\n";
foreach $row ($ts->rows) {
print join("\t\t", @$row), "\n";
}
}