in reply to File Read

Try using "+>>" in your open statement. If I understood you correctly, it will do what you want: mix reads and writes on the same file handle.

Replies are listed 'Best First'.
Re^2: File Read
by rheaton (Acolyte) on Mar 12, 2007 at 14:06 UTC

    The >> operator is the Append operator. I want to Read the Files contents. Depending on those contents (if contents = 0) then Truncate and write "1". I do not want to close the file and reopen it with a different operator as that will allow for the file to be opened by another process. There needs to be a way to open a file Read/Write, to Read the Data and then when writing to the file Truncate the data and write a value out.