$read() bug? - 17/06/06 04:04 AM
I'm not sure if this is an actual bug, or some kind of processing order that hasn't been described in the help file, but here goes.
If you have a file (eg. tmp.txt) with the contents:
You cannot do $read(tmp.txt, 1) .. It'll return the second line (2) instead of the first (1). However, if you change around the file so it looks like this:
It will work perfectly if you $read(tmp.txt, 1).
Would anyone care to explain why this happens? I did a quick search through the forum before I wrote this just to see if anyone had brought it up before, it didn't come up with anything about it.
If you have a file (eg. tmp.txt) with the contents:
Code:
1 2 line3 line4
You cannot do $read(tmp.txt, 1) .. It'll return the second line (2) instead of the first (1). However, if you change around the file so it looks like this:
Code:
line1 line2 3 4
It will work perfectly if you $read(tmp.txt, 1).
Would anyone care to explain why this happens? I did a quick search through the forum before I wrote this just to see if anyone had brought it up before, it didn't come up with anything about it.