#!/bin/perl
#edit:www.jb200.com
$address=pack("C4", 127,0,0,1);
($name, $
aliases, $addrtype, $length, @addrs) = gethostbyaddr($address,2);
($a, $b, $c, $d) = unpack ( 'C4', $addrs[0]);
print "
hostname Is $name and the Internet address Is $a.$b.$c.$d.n";