Syntactic Confectionery Delight | |
PerlMonks |
Re^2: Sorting an array on two computed fieldsby blazar (Canon) |
on Dec 16, 2005 at 11:17 UTC ( [id://517215]=note: print w/replies, xml ) | Need Help?? |
Well, still using map, this seems a good candidate for Guttman-Rossler, and such an approach is also compatible with jesuashok's new requirement:
Of course this is exclusively for illustrational purposes. In more complex or realistic situations he will have to find a suitable separator, provided that this is possible, and maybe he will have to work with index and substr instead, although pattern matching should be already optimized on fixed strings (as opposed to "real" patterns).
Oh, and of course he must know in advance that the size of his numbers has an upper bound, which seems to be the case.
In Section
Seekers of Perl Wisdom
|
|