in reply to Re: Re: creating an array of names
in thread creating an array of names

print "yes it's a month\n" if grep ($_ eq $month, @array);
The built-in grep function will return all the matches, and you care if the list is not empty.

More generally, you could use a foreach loop to look at each element in turn.

Use eq for string comparisons. = is assignment, == is numeric comparison.

—John