in reply to How can one find five max values and five min values with positions in descending and ascending order from arrays?

What did you try?

DB<103> @h{@y}=@x => ("c", "d", "e", "f", "k", "l", "m", "n") DB<104> @h{(sort @y)[0..4]} => ("f", "n", "c", "e", "d") DB<105> @h{(sort @y)[-5..-1]} => ("e", "d", "l", "m", "k")

Cheers Rolf

( addicted to the Perl Programming Language)

  • Comment on Re: How can one find five max values and five min values with positions in descending and ascending order from arrays?
  • Download Code