Copyright © tutorialspoint.com
Syntax
Definition and UsageEquivalent to the underlying C and operating system call open( ). Opens the file specified by FILENAME, associating it with FILEHANDLE. The MODE argument specifies how the file should be opened. The values of MODE are system dependent, but some values are historically set. Values of 0, 1, and 2 mean read-only, write-only, and read/write, respectively. The supported values are available in the Fcntl module, and are summarized in below Table. Note that FILENAME is strictly a file name; no interpretation of the contents takes place (unlike open), and the mode of opening is defined by the MODE argument. If the file has to be created, and the O_CREAT flag has been specified in MODE, then the file is created with the permissions of PERMS. The value of PERMS must be specified in traditional Unix-style hexadecimal. If PERMS is not specified, then Perl uses a default mode of 0666 (read/write on user/group/other).
Return Value
|
Copyright © tutorialspoint.com