in reply to Matching Sequential IP Addresses
this pushes $1 onto @segments for each match, and the empty list, IOW: nothing, for no match.my @segments = map { /^(\d{1,3}\.\d{1,3}\.\d{1,3})/ ? $1 : () } keys %hashIPs;
Note that as far as I can see, this is NOT what you want in your case.
Note also that hashes are unordered, so asking about a sequential order of keys is nonsense: they're always unordered unless you order them explicitly using (for instance) my @ordered = sort keys %hash).
|
|---|