In a foreach statement, the expression in parenthesis is evaluated to produce a list.So when you use foreach(<FILE>) you are slurping the entire file in memory before looping through the files. while on the other hand, would read the file one line at a time, which is good for your purposes.
--ZZamboni
In reply to RE: Recursively grep through directory trees.
by ZZamboni
in thread Recursively grep through directory trees.
by Melvin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |