in reply to novice falls

One more thing: If the data that you're processing contains duplicate IP addresses, you'll save redundant calls to gethostbyaddr by caching results.
$hostcache{$&} ||= gethostbyaddr($&, 'tcp'); if ( defined $hostcache{$&} ) { ...