in reply to IP address to Hostname

TIMTOWTDI. :)
1. you can use gethostbyaddr
if($input =~ /^\d+.\d+.\d+.\d+$/) { my $name = gethostbyaddr(inet_aton($input),AF_INET); }
Other way, complicated, but gives u more accurate information is
2. Querying a website ARIN
Gives you much more information by typing the IP in the "Who is" page.
Raghu