OK let's take WWW::Mechanize out of the equation, for the moment. Does this stand-alone snippet work for you?
use strict; use warnings; use HTML::TableExtract qw/ tree /; my $html = <<EOT; <html> <head> <title>test page</title> <head> <body> <table> <tr><td>parse me</td></tr> </table> </body> </html> EOT my $te = HTML::TableExtract->new; $te->parse($html); my $table = $te->first_table_found; my $tree = $table->tree; print $tree->cell(0,0)->as_text;
BTW, your test HTML is malformed (there's no closing <head> tag), but that doesn't affect the output of the script, at least on my machine...
In reply to Re^9: HTML::TableExtract (parse table column from an HTML page)
by Not_a_Number
in thread HTML::TableExtract (parse table column from an HTML page)
by cafaro
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |