in reply to In an array get the high value numerals to the lowest and also get its original index values

Try:

@array = (5,2,6,8,10,1,4,7,4,2,21,18,25,10);; @orderedIndexes = sort{ $array[ $b ] <=> $array[ $a ] } 0 .. $#array;; print @orderedIndexes;; 12 10 11 4 13 3 7 2 0 6 8 1 9 5

With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority". I knew I was on the right track :)
In the absence of evidence, opinion is indistinguishable from prejudice.
  • Comment on Re: In an array get the high value numerals to the lowest and also get its original index values
  • Download Code

Replies are listed 'Best First'.
Re^2: In an array get the high value numerals to the lowest and also get its original index values
by Anonymous Monk on Apr 20, 2016 at 07:37 UTC
    Thank you BrowserUk