go ahead... be a heretic | |
PerlMonks |
Re: sorting a list according to numeric values using the function splice()by sundialsvc4 (Abbot) |
on Aug 09, 2010 at 13:24 UTC ( [id://853811]=note: print w/replies, xml ) | Need Help?? |
FYI: As you will see from perldoc -f sort, the sort function allows a comparison-subroutine to be defined. This might be important in achieving the results that you want, although Perl is already pretty smart at “doing the right thing.” If you, for example, needed to sort a list of structures, or to perform a sort using multiple keys, this is how you do it.
In Section
Seekers of Perl Wisdom
|
|