In Perl, I want to sort the keys of a hash by value, numerically:
{
five => 5
ten => 10
one => 1
four => 4
}
producing two arrays:
(1,4,5,10) and (one, four, five, ten)
And then I want to normalize the values array such that the numbers are sequential:
(1,2,3,4)
How do I do this?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…