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 reply to Re: Array of filehandles
by Rahul6990
in thread Array of filehandles
by amma
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |