@sorted_xy = sort { $a->[0] <=> $b->[0] || $a->[1] <=> $b->[1] } @xy;
update:
I misinterpreted the structure of $xy; I thought it was a list of coordinate pairs. Use one of the other solutions instead!
Dave.
In reply to Re: sorting question
by dave_the_m
in thread sorting question
by chinman
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |