in reply to issues maintaining uniqueness

To follow up to BrowserUk's suggestion, you could also use a '%seen' hash (there's nothing magical about the name - it's just an indicator of its function.) This also processes the URLs in order.

my %seen; for $urls (@hrefs){ next if $seen{$urls}++; my $query = $res->query($urls, "A"); ...

Each new URL becomes a key in '%seen'; if a key identical to the current one already exists, we return to the top of the loop.


-- 
Human history becomes more and more a race between education and catastrophe. -- HG Wells