my $root = HTML::TreeBuilder::XPath->new; $root->parse($content); my @Baddress = $root->findvalue('//div[@id="filerDiv"]/div[@class="mailer"][2]/span/text()');