Why is the code I posted not behaving equivalently to ...
because in your original code the eof is tested only once before everything is being read and output. In the second case, it's tested for every line, so it has a chance to detect the end-of-file conditions.
In reply to Re^3: eof not recognised when applying diamond operator to invocation arguments?
by Anonyrnous Monk
in thread eof not recognised when applying diamond operator to invocation arguments?
by pat_mc
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |