in reply to Re^7: wanting to make a file of strings usable by SQL
in thread wanting to make a file of strings usable by SQL
The result of the expression, $. == 0, is a flag who's only purpose is to detect the end-of-file condition. This is the express and only purpose of eof.
$. == 0 tests whether I’m looking at the first line, which, in my reality, is not exactly the same as testing for end-of-file…
Update: err, almost. In my reality, $. == 0 is a bug and nothing but a bug. It was supposed to be $. == 1 of course. Quite how I missed that even though I actually tested the code, I don’t know.
it's author is saying that it is unnecessary to explicitly test eof in order to terminate a read loop, [… w]hich is an entirely different context to the one under discussion.
So the last if eof(DATA); line in your code is not a test to prematurely terminate the loop?
Are we discussing some alternate universe? :-)
Makeshifts last the longest.
|
|---|