Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

Re: Pulling IPv6 Address from Hostname

by idsfa (Vicar)
on Mar 13, 2008 at 14:03 UTC ( #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("", "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

Comment on Re: Pulling IPv6 Address from Hostname
Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (6)
As of 2015-11-25 06:44 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (671 votes), past polls