See the current Perl documentation for umask.
Here is our local, out-dated (pre-5.6) version:
umask - set file creation mode mask
Sets the umask for the process to EXPR and returns the previous value. If EXPR is omitted, merely returns the current umask.
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
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.