in reply to printing last 100 keys from hash

If you are concerned about the order of the messages then it would make more sense to store them in and array than in a hash. It maybe that you lookup these messages by some other value in which case you may want a hash. In that case you could use an array of keys in the order they should appear. Then instead of doing keys on the hash you just grab the last 100 elements of the array.

___________
Eric Hodges