Sophie

Sophie

distrib > Mageia > 4 > x86_64 > by-pkgid > db5d4537fe08e889516fe7a7e3e64b67 > files > 87

perl-Net-DNS-0.720.0-5.mga4.x86_64.rpm

#!/usr/local/bin/perl

use strict;
use warnings;

use Net::DNS;
use Net::DNS::Resolver::Recurse;

my $res = Net::DNS::Resolver::Recurse->new;


$res->recursion_callback(sub {
	my $packet = shift;
	
	$_->print for $packet->additional;
	
	printf(";; Received %d bytes from %s\n\n", $packet->answersize, $packet->answerfrom);
});


$res->query_dorecursion(@ARGV);