in reply to Problem with hash

There's something that you're not telling us. Hashes by themselves don't care about the data that's placed in to them. So, you must've imposed that restriction yourself. To which I would reply "don't do that". :) If all of your inserts in to the hash happen at the same time (or to be more precise, happen one after the other without anything in between), I'd do all of my inserts, and then an integrity check at the end. Something simple...like this:
foreach my $emp (values %hash) { print "ERROR: $emp not defined\n" unless exists($hash{$emp}); }

thor