it is probably due to this..
it reads the last line of the file the first time around, as it should.. does its business.
then the loop goes through and it isn't at the end of the file yet. Then you try to read the next line. It is EOF, but you still have your previous data there (the last line) so it does its business again.. then the loop exits..
a possibility.
|