Perl: the Markov chain saw | |
PerlMonks |
Re: a sort questionby duff (Parson) |
on Jun 06, 2007 at 18:58 UTC ( [id://619647]=note: print w/replies, xml ) | Need Help?? |
And just to clarify, perl's sort routine does not only do numeric or string sorting. It sorts based on any arbitrary criteria you choose as long as you're willing to write a binary tri-state comparator that has the same semantics as <=> or cmp (i.e., returns -1 for less then, 0 for equal and 1 for greater than)
In Section
Seekers of Perl Wisdom
|
|