


# takes first argument as the hostname to attempt to resolve

use Net::DNS;

$queryarg = $ARGV[0];


my $res = Net::DNS::Resolver->new;
  

$res->debug(1);

  # Perform a lookup, using the searchlist if appropriate.
  my $answer = $res->search($queryarg);
  
$res->print;

print "\nString of resolver state\n\n";

print $res->string;

print 'last answer was from: ', $res->answerfrom, "\n";

my $answer = $res->search($queryarg);

print "\n\n$queryarg\n";
