Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: HTML::TreeBuilder scan for first table

by codiac (Beadle)
on Jan 24, 2016 at 22:59 UTC ( [id://1153524]=note: print w/replies, xml ) Need Help??


in reply to HTML::TreeBuilder scan for first table

Did you read the POD for this method?
look_down

  @elements = $h->look_down( ...criteria... );
  $first_match = $h->look_down( ...criteria... );

This starts at $h and looks thru its element descendants (in pre-order), looking for elements matching the criteria you specify. In list context, returns all elements that match all the given criteria; in scalar context, returns the first such element (or undef, if nothing matched).
my $table = $h->look_down('_tag', 'table'); my @rows = $table->look_down(_tag => 'td', class => qr/HeaderTitle\b?/ +);

Replies are listed 'Best First'.
Re^2: HTML::TreeBuilder scan for first table
by mazdajai (Novice) on Jan 29, 2016 at 15:51 UTC
    Yup I did read the POD, I was trying to use one look_down method but obviously I cannot do that.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (4)
As of 2024-03-28 20:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found