If there is a builtin or a function in a preinstalled library, do not start an external program, use the builtin/function.
In most cases it's just a waste of resources, in this particular case it just won't work. The reason is that the umask does something to the shell that executes the command and the programs started later by the shell, not the program that started the shell.
Your Perl script starts a program (/bin/sh or something - the "shell" we've been talking about) and asks it to execute the "umask" command. The shell executes the command, changes ITS OWN user mask and exits.
Jenda
Enoch was right!
Enjoy the last years of Rome.
|