if ( $hash{$1} eq $2 ) { print "$1 is in hash with a value of $2\n"; }