I know the mode parameter on open is optional but the manuals states there are two default values (0 and 2). Typo I guess.

What happens if you change your open line to this:

Code:

$x = open(3, "\\skynet\Safe\_index\gd.txt", 2)




Quote:


Mode
Optional parameter that indicates what should happen if the file does not exist. This parameter can have the following values:

0 - If the file does not exist, OPEN fails with return code 2 (default).
1 - If the file does not exist, OPEN will create a new file.
2 - Opens the file for read access (default).
4 - Opens the file for write access.





BTW: A server called skynet? Reminds me of the Terminator movies.
http://en.wikipedia.org/wiki/Skynet


Edited by Mart (2006-08-02 09:47 AM)
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.