in reply to Re: Sorting through a rollover
in thread Sorting through a rollover
Is there a reason why you only use 5 digits? The problem I see is that 99999 _is larger_ than 000001. It think it would only work with some kind of "cheating". I wouldn't find it very elegant, because your script has to guess.
If it's in the lower range, 00001 is more likely the one on the bottom. If the numbers are near the top end, you can assume 00001 as first one.
Possibilities I see:
- Using one of the Neuronal Networking Modules on CPAN and train it to decide for you.
- The index numbers do not have holes (eg: nothin' like 99800, 99801, 99803, ..)
_ You make a algorithm which rates 0000n higher if the value processed before was larger and higher as, say 99990.
- Don't let it begin again at 00001
These are (imho) cool, easy, awful and clear :D