Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Comparing HTML snippets

by Tux (Canon)
on Feb 28, 2014 at 07:24 UTC ( [id://1076478]=note: print w/replies, xml ) Need Help??


in reply to Comparing HTML snippets

Your approach looks great. To get all tags in the entered order without content:

use 5.16.2; use warnings; use HTML::TreeBuilder; my $tree = HTML::TreeBuilder->new; $tree->parse_content (do { local $/; <> }); my @tags = map { $_->tag } $tree->look_down (_tag => qr{.});

Enjoy, Have FUN! H.Merijn

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (2)
As of 2025-04-23 01:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.