I strongly suggest you pick up a copy of _Perl Hacks_
http://www.oreilly.com/catalog/perlhks/. I remember there is an item in there about validating hash references, but my copy is at the office. If no one responds by Monday morning, I'll post the relevant information then.