mikejones has asked for the wisdom of the Perl Monks concerning the following question:
use strict; use warnings; use Carp; <snip> my $res = Net::DNS::Resolver->new( nameservers => [qw(nnnnn.com xxxxx.com)], recurse => 0, debug => 1, ); my $query = $res->query("CLIENT IP"); if ($query) { foreach my $rr ($query->answer) { next unless $rr->type eq "A"; ## Skip if not a host address +record ## print $rr->address, "\n"; } } else { warn "query failed: ", $res->errorstring, "\n"; } thank you!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Net::DNS::Resolver v0.61 output
by Krambambuli (Curate) on Oct 24, 2007 at 16:22 UTC | |
by mikejones (Scribe) on Oct 24, 2007 at 17:30 UTC | |
by Krambambuli (Curate) on Oct 24, 2007 at 18:27 UTC | |
by mikejones (Scribe) on Oct 24, 2007 at 19:43 UTC | |
by Krambambuli (Curate) on Oct 24, 2007 at 20:39 UTC | |
|