http://qs321.pair.com?node_id=1031167


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. } } }