my @array = qw ( a b c d x ); my %hashcheck; @hashcheck{@array} = (); my $sought = 'a'; print "Found!" if exists $hashcheck{$sought};