[PLUG] Perl help - Net::DNS objects

Daniel Johnson teknotus at gmail.com
Mon Apr 30 19:01:30 UTC 2007


On 4/29/07, drew wymore <drew.wymore at gmail.com> wrote:
> Hi List,
> Let me start by saying I'm a perl newb  :-)
>
> I'm trying to write a small DNS monitoring script using the Net::DNS perl
> module. I'm running into trouble when I use Net::DNS::Resolver and define
> nameservers($) .. I can loop through them and then using Net::DNS::Packet I
> can send a query however it appears that its only sending the packet to the
> first DNS server in my list and reporting the return object for both servers
> which is not what I want. I've tried getting the objects to return as an
> associative array but that isn't working either because its not possible or
> I'm doing something wrong. I can post my script if that will help make more
> sense of what I'm trying to accomplish. The docs for the module don't
> specify either way if they methods can be used in an array context or not.

I believe you want a seperate resolver object per server.  I wrote a
script recently
that did zone transfers on a list of domains to check for IP addresses
that needed to be changed.  The search list is ment to be a
reliability feature of DNS, such that if you don't get a prompt
response from one server it will try the next.  I used Data::Dumper a
lot when working with this to figure out the data structures, and what
information was actually there.



More information about the PLUG mailing list