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.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"Too many [] have been sedated by an oppressive environment of political correctness and risk aversion."