in reply to hash on memory or disk?

keys %maillist will generate a list of all keys in %maillist, so, if the hash is large, this list will be large as well.

If you want to iterate over a (large) hash in a memory efficient way, use each and a while loop.

Abigail