Line four didn't get you anything? You should've gotten an IO error; you're not supposed to read from files you open for writing. If even you had opened the file as w+, you still should've gotten that blank line, because of the position you are in the file (past what you have written). Files are sequential.
As to that junk text, I have no idea what's going on there.
Reputation Points: 975
Solved Threads: 140
Posting Virtuoso
Offline 1,624 posts
since Feb 2007