@new_list = map { $_->[0] } sort { $a->[1] <=> $b->[1] } map { [ $_, expensive_func( $_ ) ] } @old_list;