in reply to Archive mail into a database

Putting all your variables into a hash completely obliviates all benefits of using strict 'vars'.
You may as well make them all global variables and turn off strict 'vars'. Your code would be shorter and easier to read.

Now, if you really are tied :-) to the hash-based variable approach, you could at least use something like Tie::StrictHash, or the possibly somewhat more namespace-scaleable Tie::SecureHash.

We're building the house of the future together.