# Shorthand...top level rows() method assumes the first table found in # the document if no arguments are supplied. foreach $row ($te->rows) { print join(',', @$row), "\n"; #### use HTML::TableExtract; my $te = HTML::TableExtract->new( headers => [qr/Month\s*/, qr/First\s*/, qr/High\s*/, qr/Low\s*/, qr/Sett\s*/, qr/Chg\s*/, qr/Vol\s*/, qr/GOWAVE\*\s*/] ); $te->parse_file($sourcefile); my $record; open (DATFILE, ">> meg.dat") or die "Unable to open meg.dat: $!"; print DATFILE "Table:\n"; foreach my $ts ($te->table_states) { foreach my $row ($ts->rows) { $record = join(',', @$row); print $record . "\n"; print DATFILE $record . "\n"; } } close DATFILE; #### Month First High Low Sett Chg Vol GOWAVE* Vol Open Int