You can, but with a command line this long (admittedly could be shortened as I'm not the best golfer) - the 'dig' way just seems so much more efficient.
VinsWorldcom@C:\Users\VinsWorldcom> perl -MNet::DNS -e "$r=Net::DNS::R +esolver->new(nameservers=>['resolver1.opendns.com']); $p=$r->send('my +ip.opendns.com'); use Socket qw( inet_ntoa ); print inet_ntoa $p->{an +swer}->[0]->{address};"
In reply to Re: How would I do this "dig" command in Perl?
by VinsWorldcom
in thread How would I do this "dig" command in Perl?
by Todd Chester
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |