in reply to HTML::TreeBuilder scan for first table
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 |