laziness, impatience, and hubris | |
PerlMonks |
A generic sorting problemby frankus (Priest) |
on Jul 19, 2002 at 09:24 UTC ( [id://183171]=perlquestion: print w/replies, xml ) | Need Help?? |
frankus has asked for the wisdom of the Perl Monks concerning the following question:
Ok, I've got a piece of code where an array is sorted. Sometimes the array is all numbers, other times all characters. The artless way (to me) seemed to be to check the first element and sort depending on that. What I settled for was a catch-all:
Some of the time the job of the Pack is redundant, other times, not so. -- ¤
Back to
Seekers of Perl Wisdom
|
|