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:
The changes has: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)
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 ?)...
Note:#.. cut .. my $res = Net::DNS::Resolver->new; print "PRE: ", $res->nameservers, "\n"; $res->nameservers('my.desired.ip.addr'); print "POS: ", $res->nameservers, "\n"; #.. cut ..
--
Marco Antonio
Rio-PM
In Section
Seekers of Perl Wisdom