Do you know where your variables are? | |
PerlMonks |
Re: Dns lookupsby hippo (Bishop) |
on Dec 11, 2013 at 17:04 UTC ( [id://1066661]=note: print w/replies, xml ) | Need Help?? |
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 Section
Cool Uses for Perl
|
|