for (keys %myhash) { print "$_ eq a\n" if $myhash{$_} eq 'a'; }