in reply to Render numeric sequence as array of letters

Updated sort to numeric!

sub grade{ my (%h, %i); @h{ ('A' .. 'I')[0..$#_] } = @_; @i{ values %h } = keys %h; @i{ sort{ $b <=> $a } keys %i }; } my @n=(5, 100, 2, 8, 40); print grade @n; B E D A C

Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"When I'm working on a problem, I never think about beauty. I think only how to solve the problem. But when I have finished, if the solution is not beautiful, I know it is wrong." -Richard Buckminster Fuller