in reply to hashes

Why are you using the hash like that? Why not juse:

for (keys %hash) { ... whatever ... }
??

Cheers,
KM