Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

Re: Parse HTML using HTML::TreeBuilder

by daxim (Chaplain)
on Oct 16, 2012 at 16:35 UTC ( #999371=note: print w/replies, xml ) Need Help??

in reply to Parse HTML using HTML::TreeBuilder

Get a better/more declarative tool! Web::Query
use Web::Query qw(); my $w = Web::Query->new_from_html($html); my $the_td_element_you_want = $w->find('td:contains("@")');
From there, you can traverse to your actual, unmentioned destination in the DOM tree.
edit: I misunderstood the HTML, thanks to Anonymonk below for pointing this out. oldwarrior32, please post your full HTML document, not a debug dump.

Replies are listed 'Best First'.
Re^2: Parse HTML using HTML::TreeBuilder
by Anonymous Monk on Oct 16, 2012 at 16:52 UTC
    That is funny, since the content doesn't include @ -- that is debugging dump -- use

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://999371]
holli googles dryarian just to make sure that isn't actually thing
[holli]: I mean, you never know, right?
[shmem]: good $localtime monkses
[holli]: mmh. maybe a user handle "dry arian" is a bit unfortunate? https://www. dryarian/
[Discipulus]: exists!
[shmem]: holli, agreed. "dry airan" would be slightly better :P
[holli]: virtualsue: How much was left?
[shmem]: Discipulus: oh. tatsńchlich.
shmem missed his monkday yesterday :P - 12 years and way to go...
[1nickt]: Happy Monkday shmem. I was at my stepson's birthday party and thought of you.

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (14)
As of 2017-11-21 12:50 GMT
Find Nodes?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:

    Results (301 votes). Check out past polls.