Any reason not to use gethostbyname() instead?
perl -MSocket -e '@h=gethostbyname($_) and print "$_\n".inet_ntoa($h[4])."\n\n" for @ARGV;' perlmonks.org bing.com example.comStill no good for IPv6, obviously, but a bit less wheel reinvention.
In reply to Re: Dns lookups
by hippo
in thread Dns lookups
by perlaintdead
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |