
jryan
User
Oct 31, 2002, 6:12 PM
Post #3 of 5
(388 views)
|
|
Re: [jryan] sorting a list with primary and secondery key
[In reply to]
|
Can't Post
|
|
On second thought, this will be more efficient:
sort { substr($a,0,rindex($a,":")) ne substr($b,0,rindex($a,":")) ? substr($a,rindex($a,":")+1) <=> substr($b,rindex($b,":")+1) : $a cmp $b } @records;
(This post was edited by jryan on Nov 4, 2002, 2:29 PM)
|