my %hash1 = ("TEXT", 25); my %hash2 = ("text", 25); foreach my $item2 (keys(%hash2)) { if (exists $hash1{uc $item2}) { print "matches\n";} } #### $hash1{lc $item1} = $value1; # etc