perlquestion
Morlane
Looking for some perl magic.<br>
<br>
Given an arbitrarily long list of numbers that SHOULD be consecutive, is there a simple method of finding any missing numbers?<br>
<br>
For instance, given ( 41888, 41889, 41890, 41892, 41895 ), i'd like to determine that 41891, 41893 and 41894 are missing?<br>
<br>
I've considered populating an array, indexed by my list, then looking for missing indexes, but I don't care for changing the start index of my arrays, and with the numbers I'm using, I'd have a LOT of empty indexes before I get to my first data.<br>
<br>
I've also considered a simple loop that compares x to x+1, and steps x thru the list, but that seems kind of clunky to me.<br>
<br>
I'm hoping for some perl elegance.<br><br>Morlane