in reply to Matching Sequential IP Addresses
Assuming that you want to ensure the hash contains all the IPs with the first 3 octets + 0..255:
die "IPs missing" unless keys %hashIPs == 256; my $base = each( %hashIPs) =~ s[(\.\d+$)][]; exists $hashIPs{ $base . $_ } or die "Missing IP $base.$_" for 0 .. 25 +5;
That assumes that there are no strays in the hash, but it's not clear from your description what it might contain.
|
|---|