Pre perl 5.8 you can use Tie::Hash::FixedKeys by davorg. It has exactly the functionality you ask for with the drawback of using the tie mechanism which implies a decrease in performance.
-- Hofmator
Comment on Re: how to avoid mis-spelling hash keys?