- or download this
my %seen; # Remember IPs we have already seen
...
next unless /($RE{net}{IPv4})/;
print IP_DATA "$1\n" if not $seen{$1}++;
}
- or download this
127.0.0.1 host_a
whoops, no IP on this line
127.0.1.1 host_b
127.0.0.1 host_a (duplicate!)
junk 127.0.0.2 host_c
- or download this
127.0.0.1
127.0.1.1
127.0.0.2