in reply to HTML content editing using HTML::TreeBuilder
edit: now that the OP has removed the code snippet that he/she posted in the original question, my reply makes no sense anymore.
Looks overly complicated to find a tags where the href matches something
foreach my $a ($root->look_down (_tag => "a", href => qr{some url matc +h})) { say "Found a tag with href to ", $a->attr ("href"), " and text ", +$a->as_text; }
and move from there
Enjoy, Have FUN! H.Merijn
In Section
Seekers of Perl Wisdom