svankalken has asked for the wisdom of the Perl Monks concerning the following question:
.....my $res->nameserver(xx.xx.xx.xx); doesn't seem to be working.... any ideas?my $res=Net::DNS::Resolver->new; $res->nameservers(xx.xx.xx.xx); my $search = $res->search($input); if ($search) { foreach $rr ( $search->answer) { my $type=$rr->type; if ($type eq "A") { $host=$rr->address; } if ($type eq "PTR") { $host=$rr->ptrdname; } print "$input\t$host\n";
forgive the fomatting - still learing the <code> stuff.
edit (broquaint): added formatting
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: another net::DNS question
by Crackers2 (Parson) on Jun 28, 2004 at 04:35 UTC |