If you have a copy of the perl cookbook, section 4.1.5 'Sorting a List by Computable Field' will be helpful. You can also use the perlmonks faq, How do I sort an array by (anything)?.
In short, the sort routine can take a subroutine argument that allows you to define your comparison operation. If this operation is complex or computationally expensive, you might want to learn about a Schwartzian Transformation. Both of the above links will have some starting points for learning about Schwartzian Transformations.
In reply to RE: Rountines
by johannz
in thread Rountines
by bmhm
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |