foreach $host (@ARGV) { ($name, $aliases, $addrtype, $length, @addrs) = gethostbyname($host); #gethostbyname IS A PERL function? print "$host:\n"; foreach $a (@addrs) { $i = join(".", unpack("C4", $a)); if( ! $i ) { print ">>>>>>$i<<<<<<\n"; print "NOT FOUND\n"; } else { print "$i\n"; } } }
In reply to hostname from ip by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |