Rolf,
I am confused now too. Are you saying WWW::Mechanize supports CSS selector and XPath? Or that WWW::Mechanize::Firefox does? If the latter, I also read it was very difficult to build.
Query syntax is not a Perl question, but there are plenty of good tutorials online.
I agree. However, determining how best to query HTML source via Perl is.
The option of mirroring the DOM into a Perl/XML data structure and using the query API sounds quite good. I'll give that a go and see how it works. Anything is better than parsing table tags with TokParser.