in reply to Re^2: while behaviour on binary files
in thread while behaviour on binary files
Your misunderstanding is that <DATFILE> actually _reads_ from the file until the next end-of-line character. (You then throw away the data.) It's not the test for end-of-file. eof() is.