$i = 0; where 12 is the size of my array. and i is an index, or is there an al +ternative? while($i != 12){ if($month = $array[i]){ print "yes it's a month\n"; } } #### foreach my $item ($array) { print "its the month of $month\n" if ($month eq $array[$i]; }