in reply to sort hash based on values

Do you mean generate a sorted array of the hash keys sorted by hash value? See How do I sort a hash (optionally by value instead of key)?.


Perl is Huffman encoded by design.