By default, <> will read one line at a time. However, foreach builds up the list before iterating over it so the above code will read the entire file into memory and then start iterating over the lines.
For this type of thing you are much better off using while.
- tye (but my friends call me "Tye")In reply to (tye)Re: Foreach & file io
by tye
in thread Foreach & file io
by Xxaxx
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |