http://qs321.pair.com?node_id=11104044


in reply to HTML::TreeBuilder::XPath finding attribute values

As Corion points out your query is returning an Attribute node so you need to replace as_text with string_value. You can also test the node like this:
if ( $d->isAttributeNode ) { print qq(D=\n); print $d->string_value; }

Replies are listed 'Best First'.
Re^2: HTML::TreeBuilder::XPath finding attribute values
by mldvx4 (Friar) on Aug 11, 2019 at 12:32 UTC

    Thanks. That 'isAttributeNode' was very useful to learn about.