if (grep {$_ eq $filename} @index_file_names) { #### my $found; for (@index_file_names) { ++$found if $_ eq $filename; } if ($found) {