use strict; use warnings; my %hash1 = (TEXT => 25, Text => 25, Wibble => 20); my %hash2 = (text => 25, TexT => 25, wibble => 20); my %h1Keys; my %h2Keys; push @{$h1Keys{lc $_}}, $_ for keys %hash1; push @{$h2Keys{lc $_}}, $_ for keys %hash2; my @common = grep {exists $h2Keys{$_}} keys %h1Keys; print "Hash 1 keys \[@{$h1Keys{$_}}\] match \[@{$h2Keys{$_}}\] in hash 2\n" for @common;