sysopen filehandle, filename, mode, [perms]
The possible values and flag bits of the mode parameter are system-dependent; they are available via the Fcntl library module. However, for historical reasons, some values are universal: zero means read-only, one means write-only, and two means read/write.
If the file named by filename does not exist, and
sysopen creates it (typically because
mode includes the
then the value of perms specifies the permissions of
the newly created file. If perms is omitted, the
default value is
0666, which allows read and write for all.
This default is reasonable: see
The FileHandle module provides a more
object-oriented approach to