perlfunc
gods
<P>
umask - set file creation mode mask
<P>
<HR>
<P>
umask
<FONT SIZE=-1>EXPR</FONT>
<P>
umask
<P>
<HR>
<P>
Sets the umask for the process to
<FONT SIZE=-1>EXPR</FONT> and returns the previous value. If
<FONT SIZE=-1>EXPR</FONT> is omitted, merely returns the current umask.
<P>
If
<CODE>umask(2)</CODE> is not implemented
on your system and you are trying to restrict access for <EM>yourself</EM> (i.e.,
<FONT SIZE=-1>(EXPR</FONT> & 0700) > 0), produces a fatal error at run time. If
<CODE>umask(2)</CODE> is not implemented and you are not trying to restrict access for yourself, returns
[perlfunc:undef|undef].
<P>
Remember that a umask is a number, usually given in octal; it is <EM>not</EM> a string of octal digits. See also [perlfunc:oct|oct], if all you have is a string.
<HR>