unlink("linktest.log"); $xfile = "$ARGV[0]"; open(OUT, ">>linktest.log"); use XML::XPath; use XML::XPath::XMLParser; use Test::HTTPStatus tests=>1; $xp = XML::XPath->new(filename => $xfile); $nodeset1 = $xp->find('//xref/@href'); foreach $node1 ($nodeset1->get_nodelist) { $aid=XML::XPath::XMLParser::as_string($node1); $aid=~s!href="!!g; $aid=~s!"!!g; $aid=~s! !!g; $a=http_ok( $aid, HTTP_OK ); sleep 10; print OUT "$aid\n" if ($a == 0); } close(OUT);