Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Pulling IPv6 Address from Hostname

by idsfa (Vicar)
on Mar 13, 2008 at 14:03 UTC ( [id://673970]=note: print w/replies, xml ) Need Help??


in reply to Pulling IPv6 Address from Hostname

use Net::DNS; my $res = Net::DNS::Resolver->new; my $query = $res->query("example.com", "AAAA"); if ($query) { foreach $rr (grep { $_->type eq 'AAAA' } $query->answer) { print $rr->address, "\n"; } } else { warn "query failed: ", $res->errorstring, "\n"; }

The intelligent reader will judge for himself. Without examining the facts fully and fairly, there is no way of knowing whether vox populi is really vox dei, or merely vox asinorum. — Cyrus H. Gordon

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://673970]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (2)
As of 2024-04-19 01:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found