or download this
my @nameList = qw/Anna Beatrix Claude Damian/;
my %names = map { $_ => 1 }, @nameList; # associate the value 1 to eac
+h name in @namelist. Actually the value could be anything in this cas
+e
print "Anna exists" if exists $names{"Anna"};
print "Paul doesn't exist" unless exists $names{"Paul"};