in reply to non-autovivifing hash

There's Tie::StrictHash, which has you define the hash keys and values once and then complains if you try to assign to a new key.

----
I wanted to explore how Perl's closures can be manipulated, and ended up creating an object system by accident.
-- Schemer

Note: All code is untested, unless otherwise stated