Subject: | Can't get it to work |
Any idea why this fails?
#!/usr/bin/env perl
use strict;
use warnings;
use HTML::TableExtract;
use LWP::Simple;
my $html = get('http://www.janetandrichardsgenealogy.co.uk/ramsgate%20parish%20register%20extract%20-%20st_marys_baptisms.html');
my $te = HTML::TableExtract->new(headers => [qw(Baptised Born First Sex Last Parents Abode Trade Comments)]);
$te->parse($html) || die "Can't parse";
foreach my $ts ($te->tables) {
print "Table (", join(',', $ts->coords), "):\n";
foreach my $row($ts->rows()) {
print join(',', @{$row}), "\n";;
}
}