H
Hongyi Zhao
#!/usr/bin/perl
use warnings;
use strict;
use Socket;
while ( <> ) {
chomp;
my ( $address, $port ) = split /:/ or next;
my $number = inet_aton $address;
my $name = gethostbyaddr $number, AF_INET;
Considering that NOT ALL IPs can be resolved to host or FQDN name
correctly, it may be more robust adding this line here:
$name ||= '?';