in reply to Matching Sequential IP Addresses
my %hashSeg; for my $ip (sort keys %hashIPs) { if ($ip =~ /(\d{1,3}\.\d{1,3}\.\d{1,3})\.\d{1,3}/){ my $seg = $1; $hashSeg{$seg}++; } } for my $seg (keys %hashSeg){ if ($hashSeg{$seg} ne '255'){ print "$seg is not a full \/24\n"; } else { print "$seg is a full \/24\n"; } }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Matching Sequential IP Addresses
by ikegami (Patriarch) on Apr 07, 2008 at 03:47 UTC | |
by tachyon-II (Chaplain) on Apr 07, 2008 at 05:07 UTC |