in reply to More permanent umask ?

The mode for a new file is a combination of the bits specified by the open/create call and the umask bits. Any bit listed in the umask is cleared from the open/create request. So the umask doesn't force a particular ultimate protection settings: it can only modify a request.

You mentioned "umask command", so I'm guessing you tried something like:

system "umask 002";
This won't work, because the umask is a per-process value. You've just changed the umask in a child shell, not in your Perl process, where it would actually matter.

What you want is the Perl built-in umask operator:

umask 002;
That should affect your current process umask.

-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.