Welcome to the Monastery | |
PerlMonks |
Re: How do I write my own sorting routine?by jarich (Curate) |
on Dec 22, 2003 at 05:57 UTC ( [id://316312]=note: print w/replies, xml ) | Need Help?? |
If you have a hash which specifies an ordering for values, then your sorting is much easier:
Now to sort, we just compare the array elements as keys into the hash: Hence: would sort into:
In Section
Seekers of Perl Wisdom
|
|