my $key = 'key01'; if (exists $hash{$key}) { print "$key is in hash"; }