my $fh_hex = sprintf '0x%x', $new_conn; my $peerhost = $new_conn->peerhost(); my $peerport = $new_conn->peerport(); my $peeraddr = $new_conn->peeraddr(); my $peerhostfull = gethostbyaddr($peeraddr, AF_INET) || "Cannot resolve"; print "Accepted new connection $fh_hex ($peerhost:$peerport,host=$peerhostfull)\n";