if($input =~ /^\d+.\d+.\d+.\d+$/) { my $name = gethostbyaddr(inet_aton($input),AF_INET); }