http://www.perlmonks.org?node_id=571094


in reply to Re^2: Net::DNS::Resolver and very slow reply
in thread Net::DNS::Resolver and very slow reply

Using an Windows XP on dial connection made this times:
C:\Documents and Settings\mda>perl dns.pl 11 wallclock secs ( 0.00 usr + 0.03 sys = 0.03 CPU)1: 200.228.126.26 + (record type A)
The changes has:
use Benchmark; my $td = new Benchmark; my @domainIp = resolveDomainIp ('hostname'); print timestr(timediff(new Benchmark, $td));

But a question... Why nslookup is more quickly?
I donīt known details, but supose the use of caches on windows, or more simple do identify nameserver...

When I defining my nameserver has a less time. Checking why, I see other nameserver (local connection... lost configs ?)...

#.. cut .. my $res = Net::DNS::Resolver->new; print "PRE: ", $res->nameservers, "\n"; $res->nameservers('my.desired.ip.addr'); print "POS: ", $res->nameservers, "\n"; #.. cut ..
Note:

--
Marco Antonio
Rio-PM