umask - set file creation mode mask
umask EXPR
umask
Sets the umask for the process to EXPR and returns the previous value. If EXPR is omitted, merely returns the current umask.
If
umask(2)
is not implemented
on your system and you are trying to restrict access for yourself (i.e.,
(EXPR & 0700) > 0), produces a fatal error at run time. If
umask(2)
is not implemented and you are not trying to restrict access for yourself, returns
undef.
Remember that a umask is a number, usually given in octal; it is not a string of octal digits. See also oct, if all you have is a string.
If rather than formatting bugs, you encounter substantive content errors in these documents, such as mistakes in the explanations or code, please use the perlbug utility included with the Perl distribution.