<?xml version="1.0" encoding="windows-1252"?>
<node id="673970" title="Re: Pulling IPv6 Address from Hostname" created="2008-03-13 10:03:40" updated="2008-03-13 06:03:40">
<type id="11">
note</type>
<author id="195379">
idsfa</author>
<data>
<field name="doctext">
&lt;code&gt;
  use Net::DNS;
  my $res   = Net::DNS::Resolver-&gt;new;
  my $query = $res-&gt;query("example.com", "AAAA");
  if ($query) {
      foreach $rr (grep { $_-&gt;type eq 'AAAA' } $query-&gt;answer) {
          print $rr-&gt;address, "\n";
      }
  }
  else {
      warn "query failed: ", $res-&gt;errorstring, "\n";
  }

&lt;/code&gt;
&lt;!-- Node text goes above. Div tags should contain sig only --&gt;
&lt;div class="pmsig"&gt;&lt;div class="pmsig-195379"&gt;
&lt;hr/&gt;
&lt;I&gt;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. &amp;mdash; Cyrus H. Gordon&lt;/I&gt;
&lt;/div&gt;&lt;/div&gt;</field>
<field name="root_node">
673800</field>
<field name="parent_node">
673800</field>
</data>
</node>
