This function opens the file whose filename is given by
FILEHANDLE is an expression,
its value is used as the name of (or reference to) the filehandle.
This function calls open(2) with the
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
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 umask.