in reply to Getting an array slice of value assignments in a hash

The fact that, for 0 <= $i < @arr, $arr[ $i ] == $i makes @arr irrelevant (so the solutions you received before the correction are still valid). But for the general case where this equality does not hold

print join ',', @arr[ @vals{ sort { $a <=> $b } keys %vals } ];
...though I think code should be easier to read than that. I would break that up a bit; e.g.:
my @sorted_keys = sort { $a <=> $b } keys %vals; print join ',', @arr[ @vals{ @sorted_keys } ];

the lowliest monk