in reply to Re: Remembering original order of an array
in thread Remembering original order of an array

That produces a different output than your original post, but if that's what you want, it can be simplified to:

my @sorted_indexes = sort { $array[$a] cmp $array[$b] } 0..$#array;

Note that cmp (not <=>) should be used here since you are comparing strings (not numbers).