in reply to hash sorting problems

Is there some reason why you're rolling your own sort instead of using the built-in sort function? The Perl FAQ has a nice section on hashes, and there's even a question that gives sample code for sorting a hash.

---
I'm too sexy for my .sig.