I am using NET:DNS module for my DNS lookup. It works fine and returns IP4 address but it doesnt return IPv6 addresses. I am using perl 5.10

please find below my program

use Net::DNS; my $res = Net::DNS::Resolver->new(debug=>0, igntc=>1, recurse=>1, retrans=>0, retry=>1); $res->port($nameserverport); $res->nameservers("$nameserver"); $res->usevc(1); $res->tcp_timeout($timeout); $res->srcaddr($srcaddr); $res->srcport($srcport); my %result_set = (); my $ttl = 0x7fffffff; #Query type is "A" ,"MX" ,"CNAME" my $query = Net::DNS::Packet->new($address, "A"); my $response = $res->send($query); if ($response->header->ancount > 0) { foreach my $rr ($response->answer) { my $rr_addr; if ($rr->type eq $querytype && $querytype eq "A"){ $rr_addr = $rr->address; } if ($rr_addr) { $result_set->{$rr_addr} = 1; push(@result, $rr_addr); $ttl = $rr->ttl unless ($ttl < $rr->ttl); } } }
Any help on this will be appreciated.

In reply to IPV6 support for DNS lookup by suman583

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.