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