@a = sort {COMPLEX EXPRESSION <=> COMPLEX EXPRESSION} @b #### @a = map {$_->[0]} sort {$a->[1] <=> $b->[1]} map {[$_, COMPLEX EXPRESSION]} @b