Welcome to the Monastery | |
PerlMonks |
Re: Suppress output from nslookupby Necos (Friar) |
on May 18, 2007 at 02:47 UTC ( [id://616149]=note: print w/replies, xml ) | Need Help?? |
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:
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;"
In Section
Seekers of Perl Wisdom
|
|