in reply to Name resolution module

Hi, I'm certain that you know far more than I do about networking, but have you tried Net::Nslookup which wraps Net::DNS::Resolver?

$ perl -Mstrict -MNet::Nslookup -E 'say scalar nslookup "www.google.co +m"' 209.85.232.104
Not sure about IPv4 vs IPv6, but maybe you can extend it/steal the good parts?

Also note that (as you probably know) Google and others use load-balanced DNS so you will likely get a different result each time you query.

Hope this helps!


The way forward always starts with a minimal test.

Replies are listed 'Best First'.
Re^2: Name resolution module
by VinsWorldcom (Prior) on Oct 03, 2017 at 13:50 UTC

    Thanks. I had seen Net::DNS::Resolver which is under Net::DNS. It just didn't provide the varied output I'm looking for - at least I think not - between IPv4/6 and reverse lookups. You need to specify the address family into the routine if I remember correctly.

    I'll have a look at Net::NSLookup.