in reply to Recursively grep through directory trees.
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
|
|---|