I need to sort a hash by its key. I can't get this to work because I can't figure out how to keep the hash's values and keys together. What I was trying to do was extract the keys to an array using keys %hash, but then I don't know how to match the keys with its value.