use Web::Query 'wq'; my $w = wq('http://www.guardian.co.uk'); my @headings = $w->find('h1')->text; # ( # "Coulson and Brooks face phone hacking prosecution", # " Usain Bolt: 'A lot of legends have come before me - but this is my time' ", # )