I have the code below which is supposed to click and go to each link with the text… What is happening is that $l stays the letter A, and collects the page for A 26x … Any ideas?
my $mech = WWW::Mechanize->new();
$mech->get($info->website);
my $te = HTML::TableExtract->new();
my @abc = ("A" .. "Z");
foreach my $letter (@abc){
$mech->find_link(text => $letter);
$mech->follow_link(text => $letter);
$content = $mech->content();
$te->parse($content);
$table = $te->first_table_found;
$str .= Dumper $table;
$mech->back();
}
The problem is that HTMLTableExtract was not getting the new data. Moved the TE initialization into the loop $te->parse($content) was overwriting what it already had.