in reply to Array of filehandles
Hi, I would prefer
my @matching_file; foreach $file (@file_list) { open (my FH, '<', $file); while(<FH>) { if(/<your pattern>/) { push(@matching_file,$file); #Store files in which pattern is pres +ent. last; #Once the pattern is found no need to iterate further the +same file. } } }
|
---|
In Section
Seekers of Perl Wisdom