specificity() Calculate the specificity for any given passed selector, a critical factor in determining how best to apply the cascade A selector's specificity is calculated as follows: * count the number of ID attributes in the selector (= a) * count the number of other attributes and pseudo-classes in the selector (= b) * count the number of element names in the selector (= c) * ignore pseudo-elements. The specificity is based only on the form of the selector. In particular, a selector of the form "[id=p33]" is counted as an attribute selector (a=0, b=0, c=1, d=0), even if the id attribute is defined as an "ID" in the source document's DTD. See the following spec for additional details: NAME HTML::Query - jQuery-like selection queries for HTML::Element SYNOPSIS Creating an "HTML::Query" object using the Query() constructor subroutine: use HTML::Query 'Query'; # using named parameters $q = Query( text => $text ); # HTML text $q = Query( file => $file ); # HTML file $q = Query( tree => $tree ); # HTML::Element object $q = Query( query => $query ); # HTML::Query object $q = Query( text => $text1, # or any combination text => $text2, # of the above file => $file1, file => $file2, tree => $tree, query => $query, ); # passing elements as positional arguments $q = Query( $tree ); # HTML::Element object(s) $q = Query( $tree1, $tree2, $tree3, ... ); # or from one or more existing queries $q = Query( $query1 ); # HTML::Query object(s) $q = Query( $query1, $query2, $query3, ... ); # or a mixture $q = Query( $tree1, $query1, $tree2, $query2 ); # the final argument (in all cases) can be a selector my $spec = 'ul.menu li a'; #