> creation.  However, what I'd really like to do is, after the hash has
> been created, sort it on the key in a manner similar to the way that I
> would sort an array with the sort!() method and then preserve the sorted
> order.  Any ideas on how I might accomplish that feat?  Thanks for any
> input.
>
>      ... doug


Does this work?


h = {}
arr = ["t","c","h","b","l"]
arr.each{|x| h[x] = x + "ook"}

h = Hash[h.sort]
p h   #> {"b"=>"book", "c"=>"cook", "h"=>"hook", "l"=>"look", "t"=>"took"}



Harry