Hm. Doesn't XPath do just that?
Makeshifts last the longest.
In reply to Re^2: Bringing Logic Programming to Perl by Aristotle in thread Bringing Logic Programming to Perl by Ovid