my $output = $response->content; my $xp = XML::XPath->new(xml => $output); my $nodeset = $xp->find('/aws:UrlInfoResponse/aws:Response'); my $nnodes = @{ $nodeset }; for my $i (0..$nnodes-1) { my $status = $nodeset[$i]->findvalue('/aws:ResponseStatus/aws:StatusCode'); }