in reply to Re: How would I do this "dig" command in Perl?
in thread How would I do this "dig" command in Perl?
Eventually in the same file there is another quick hack about DNS query using gethostbyname:<P> perl -MNet::DNS -MSocket -E "say inet_ntoa(Net::DNS::Resolver->new(na +meservers=>[shift])->send(shift)->{answer}->[0]->{address});" resolve +r1.opendns.com perlmonks.org<P>
perl -MSocket -e "print map {qq($_ : ).inet_ntoa((gethostbyname$_)[4] +).qq(\n)} @ARGV"
|
|---|