Help for this page
foreach my $file_name (@array) { open FILE, "$file_name" or die "File not exists"; ... print OUTPUT $_ if /^(.*?,.*?),/ and exists $records{$1}; } }