in reply to equal keys in a hash

In any normal hash, no two keys can be the same anyway. Assuming that you mean that you need to check that a key doesn't already exist, you can use exists, like this:
my %hash; my $key = "test"; if (exists $hash{$key}) { # do something } else { # do something else }
You're question's not particularly clear, and that's a complete stab in the dark *grin* - could you post a little more about what it is you're trying to achieve?

-- Foxcub
#include www.liquidfusion.org.uk