I don't have a Solaris or AIX machine to check, but the Linux man page for fopen says that r+ (+<) and w+ (+>) open the file and position the stream at the beginning of the file, while a+ (+>>) positions the stream at the end of the file. So your options are either to open with +>> and then seek to the beginning of the file before reading, or open with +<, read, and then seek to the end of the file before writing (although you will probably end up at the end of the file anyway, if you read the entire contents).
In reply to Re: open(F1,"+>>$FILE") works on Solaris,AIX but not Linux??
by jasonk
in thread open(F1,"+>>$FILE") works on Solaris,AIX but not Linux??
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |