user
DNS is an internet service that maps domain names, like `rosettacode.org`, to IP addresses, like `66.220.0.231`.

Use DNS to resolve `www.kame.net` to both IPv4 and IPv6 addresses. Print these addresses.
assistant
(formerly Perl 6)

**Works with**: Rakudo version 2017.01

```
use Net::DNS;

my $resolver = Net::DNS.new('8.8.8.8');

my $ip4 = $resolver.lookup('A',    'orange.kame.net');
my $ip6 = $resolver.lookup('AAAA', 'orange.kame.net');

say $ip4[0].octets.join: '.';
say $ip6[0].octets.».fmt("%.2X").join.comb(4).join: ':';

```

Output:

```
203.178.141.194
2001:0200:0dff:fff1:0216:3eff:feb1:44d7
```