perlquestion
jdlev
I'm really struggling with trying to figure out if HTML::TableExtract is finding any legitimate tables. I'm trying to use the header method. Is there a simple way to print to screen whether the header method actually found a table, or if it doesn't find a table, have it print an error? Here's what I'm using: <p>
<code>
use HTML::TableExtract;
$te = HTML::TableExtract->new( headers => [qw(Date Price Cost)] );
$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";
}
}
</code>
<p>
<!-- Node text goes above. Div tags should contain sig only -->
<div class="pmsig"><div class="pmsig-731671">
I love it when a program comes together - jdhannibal
</div></div>