in reply to Tying hashes with undef keys

Don't have time to try it now, but based on the perl source, returning an overloaded object should work.

It also looks like NEXTKEY gets passed the previous key - something I don't remember seeing in the doc. Ah, it is documented. Learning something new every day++.