in reply to Sorting by Array values, obtaining indices

my @idx = map $_->[1], sort { $a->[0] <=> $b->[0] } map [$vals[$_], $_], 0..$# +vals;

D'oh.

the lowliest monk