Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Thanks in Advanceforeach $name (@name_array) { $wanted_name = ($name); foreach $file (@files) { open (FILE, $file); @array = <FILE>; close(FILE); foreach $line (@array) { if ($line =~ m/$wanted_name/i) { print OUTPUTFILE "$line"; } } } } close(OUTPUTFILE);
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Nested foreach problem
by kyle (Abbot) on Aug 19, 2008 at 17:14 UTC | |
Re: Nested foreach problem
by olus (Curate) on Aug 19, 2008 at 17:16 UTC | |
Re: Nested foreach problem
by dwm042 (Priest) on Aug 19, 2008 at 18:09 UTC | |
Re: Nested foreach problem
by Bloodnok (Vicar) on Aug 19, 2008 at 17:20 UTC | |
by kyle (Abbot) on Aug 19, 2008 at 17:55 UTC |