Using 'if exists' to check the entry in hash
#!/usr/bin/perl -w use strict; my %where = ( A => "AA", B => "BB", C => "CC", D => "DD" ); print "A!\n" if exists $where{A};