The <=> operator returns 0 if the two numbers are equal, -1 if $a<$b and 1 if $a>$b. Hope that helps.@sorted_list = sort {$a<=>$b} @unsorted_list
In reply to Re: Simon Davey
by physgreg
in thread Looking for numeric sort (was Simon Davey)
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |