http://qs321.pair.com?node_id=1025675


in reply to <> oddity ?

Just one more thought... The difference between the first and the other two methods is that in the first you read directly from file whereas in the others you go via the shell somehow. The latter might modify your file. So I am thinking whether there is something in your file sample.txt causing the problem? Such as a missing newline or some non-ASCII, non-printing character? (No further noise from my side...)