in reply to Opening a file for writing

somewhat in the vain of fglock's reply above:

If you have ftp access to the machines, you could use ftpfs to mount the remote system locally and then you can access its files using normal open/read/write calls, as you want.

Another, seriously more involved, solution is to use netcat (google around for it). You'd want to put netcat on both sides of the connection, connect the target file to the remote netcat and then use socket calls to open a filehandle on the local netcat, through which you can access the remote file. This solution is a lot more complicated and error-prone than the first one, but should work even if you do not have ftp access or root access to the other machine.

CU
Robartes-