Here is more example code that demonstrates how to use XPath and CSS Selector to do screen scraping without using nasty regular expressions.The task is "Access search.cpan.org for XML and extract 1) how many modules are there and 2) link to the PODs with module names"There you go: #!/usr/bin/perl use strict; use warnings; use utf8; use Encode; use HTML::Selector::XPath; use HTML::TreeBuilder::XPat