> 1. loop over an array of hostnames and resolve them each with a call
> gethostbyname

gethostbyaddr is what you want. sorry.

> 2. use Net::DNS and do a named xfer for the domain all the servers are in
> and afterwards grep through the results for the hosts you actually need.
>
>        Perform a zone transfer and print all the records.
>
>          use Net::DNS;
>          $res = new Net::DNS::Resolver;
>          $res->nameservers("ns.foo.com");
>          @zone = $res->axfr("foo.com");
>          foreach $rr (@zone) {
>              $rr->print;
>          }
> Net::DNS is nice, but needs some reading. But it would solve the "query
> once and filter output" approach you prefer. gethostbyname is easier to
> program, but you will see one DNS query for each host.

and if you want the actual reverse mapping instead of the forwardmapping, 
you have to fetch a different zone. Depends on your requirments.

Cheers,
oliver

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to