in reply to umask settings in perl

umask gets or sets the default file permissions. With a parameter it sets the default permissions to the binary complement of the mask (octal). This is simply 777 - x where x is the argument to umask, although be aware that umask can accept four octal digits to play the same game with the higher order flags as well. So in the example of the OP, umask 022 would set the default permissions to 755. After that a mv will then by default use the permissions implied by the umask that is in effect which in the example would be 755.

-M

Free your mind