title: DNS Resolver result from multiple nameservers
body: <p>I am passing two name servers to the <a href="https://metacpan.org/module/Net%3a%3aDNS%3a%3aResolver" rel="nofollow"><code>Net::DNS::Resolver</code></a> constructor but I am getting only one result back.</p>
  
  <p>How should I change the code to receive result from all the name servers?</p>
  
  <pre><code>sub resolve_dns()
  {
      my $dns = $_[0];
      my $res   = Net::DNS::Resolver-&gt;new(
  
                  nameservers =&gt; [qw(24.116.197.232 114.130.11.67 )],
                  recurse     =&gt; 0,
                  debug       =&gt; 1,
                  tcp_timeout =&gt; 3
                  );
      my $query = $res-&gt;search($dns);
  
      if ($query) {
          foreach my $rr ($query-&gt;answer) {
              next unless $rr-&gt;type eq "A";
              print $rr-&gt;address, "\n";
          }
      } else {
          warn "query failed: ", $res-&gt;errorstring, "\n";
      }
  }
  </code></pre>