From: agemoagemo@... Date: 2003-10-30T15:41:43+09:00 Subject: Problem with seeking in existing files. I'm trying to write a program that will be writing data to an existing file, that will not necessarily be done in the physical file order. I used mode 'ab+' to open the file, as only the 'a' modes allow writing without changing the existing file. I am using sysread and syswrite to work with the file. The problem is that seek doesn't seem to work. At first I thought it might be regarding the end of the original file as the 0 point, but some more testing showed that even with an empty file, seek was not changing the position of the file pointer. I did some tests in IRB with a file opened with the same mode, and seek seemed properly in it. Changing the mode in the program to 'ab' did not work. (And I'm eventually going to need read-write capability anyway...) Anyone know what could be causing this problem? -Morgan. __________________________________ Do you Yahoo!? Exclusive Video Premiere - Britney Spears http://launch.yahoo.com/promos/britneyspears/