Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: HTML content editing using HTML::TreeBuilder

by Tux (Abbot)
on Apr 10, 2019 at 07:58 UTC ( #1232391=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1232391]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2020-07-12 10:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?