in reply to IPV6 support for DNS lookup

Agree with aitap above, IPv6 requires a query type of "AAAA". Your script has much bigger problems since it doesn't work at all. The following worked for me (Windows 7 x64 / Strawberry 5.18.1 MSWin32-x64-multi-thread):

use strict; use warnings; use Net::DNS; my $res = Net::DNS::Resolver->new(debug=>0, igntc=>1, recurse=>1, retrans=>0, retry=>1 ); $res->nameservers("8.8.8.8"); my %result_set = (); my $query = Net::DNS::Packet->new("www.google.com", "AAAA"); my $response = $res->send($query); if ($response->header->ancount > 0) { foreach my $rr ($response->answer) { if ($rr->type eq "AAAA") { $result_set{$rr->address} = 1; } } } use Data::Dumper; print Dumper \%result_set;

Producing:

VinsWorldcom@C:\Users\VinsWorldcom\tmp> test.pl $VAR1 = { '2607:f8b0:4006:803:0:0:0:1010' => 1 };