![]() |
|
Perl Monk, Perl Meditation | |
PerlMonks |
Re: (Hopefully) simple sorting questionby sundialsvc4 (Abbot) |
on Jun 03, 2011 at 11:47 UTC ( #907955=note: print w/replies, xml ) | Need Help?? |
Briefly, your sort-comparison function will consider x first, and then consider y only when the values of x are equal. You also may need to do a little magic (e.g. “<” vs. “lt”) to be certain that the comparison being performed is, in fact, a numeric one. Test thoroughly.
In Section
Seekers of Perl Wisdom
|
|