Well, perl has the gethostby* functions, and in your case, you need gethostbyaddr(). From the perldoc page:
For the gethost*() functions, if the "h_errno" variable is sup-ported in C, it will be returned to you via $? if the function call fails. The @addrs value returned by a successful call is a list of the raw addresses returned by the corresponding sys- tem library call. In the Internet domain, each address is four bytes long and you can unpack it by saying something like:
($a,$b,$c,$d) = unpack('C4',$addr[0]);
The Socket library makes this slightly easier:
use Socket;
$iaddr = inet_aton("127.1"); # or whatever address
$name = gethostbyaddr($iaddr, AF_INET);
# or going the other way
$straddr = inet_ntoa($iaddr);
This should get you going in the right direction.
Theodore Charles III
Network Administrator
Los Angeles Senior High
4650 W. Olympic Blvd.
Los Angeles, CA 90019
323-937-3210 ext. 224
email->secon_kun@hotmail.com
perl -e "map{print++$_}split//,Mdbnr;"