=over =item sysopen FILEHANDLE,FILENAME,MODE =item sysopen FILEHANDLE,FILENAME,MODE,PERMS Opens the file whose filename is given by FILENAME, and associates it with FILEHANDLE. If FILEHANDLE is an expression, its value is used as the name of the real filehandle wanted. This function calls the underlying operating system's C function with the parameters FILENAME, MODE, PERMS. The possible values and flag bits of the MODE parameter are system-dependent; they are available via the standard module C. For historical reasons, some values work on almost every system supported by perl: zero means read-only, one means write-only, and two means read/write. We know that these values do I work under OS/390 & VM/ESA Unix and on the Macintosh; you probably don't want to use them in new code. If the file named by FILENAME does not exist and the C call creates it (typically because MODE includes the C flag), then the value of PERMS specifies the permissions of the newly created file. If you omit the PERMS argument to C, Perl uses the octal value C<0666>. These permission values need to be in octal, and are modified by your process's current C. You should seldom if ever use C<0644> as argument to C, because that takes away the user's option to have a more permissive umask. Better to omit it. See the perlfunc(1) entry on C for more on this. See L for a kinder, gentler explanation of opening files. =back