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; }
In Section
Seekers of Perl Wisdom