my %h = ( 'aDobe' => 'abcd', 'big boss' => 'gcd', 'ADOBe' => 'abcd2' ); my $str = 'AdOBE'; for ( keys %h ) { print "$h{$_}\n" if lc $_ eq lc $str; }