G'day mcoblentz,
"I am getting a basic error: Can't call method "rows" on an undefined value ..."
The only code you show with that method (i.e. the point where the error occurs) is:
foreach my $row ($te->rows) {
Some lines earlier in your code you declare $te:
my $te;
At the point of declaration it will have "an undefined value". At the point where the error occurs it has "an undefined value". Track its value through the code between those two points to find where it's being directly assigned undef or its value is being changed to undef through a side-effect. You'll now have a narrow focus for your troubleshooting efforts.
"I have tried dumping the table but I don't understand the results from Dumper."
You haven't shown this output, or even given a hint as to what part you don't understand, so I'm not sure what you think we can do about that. Perhaps the Data::Dumper documentation will help.
Your code shows other print statements. At least one of those probably had some output: you don't show that either.
I recommend you take a look at perlobj: Invoking Class Methods. Read the section "Indirect Object Syntax"; noting its first paragraph, which is all in bold, and includes the text:
"..., use of this syntax is discouraged as it can confuse the Perl interpreter. ..."
Please follow this advice and change your code accordingly.
-- Ken
In reply to Re: Table scraping
by kcott
in thread Table scraping
by mcoblentz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |