Perl 5 version 16.1 documentation
- chmod LIST
Changes the permissions of a list of files. The first element of the list must be the numeric mode, which should probably be an octal number, and which definitely should not be a string of octal digits:
0644is okay, but
"0644"is not. Returns the number of files successfully changed. See also oct if all you have is a string.
On systems that support fchmod(2), you may pass filehandles among the files. On systems that don't support fchmod(2), passing filehandles raises an exception. Filehandles must be passed as globs or glob references to be recognized; barewords are considered filenames.
You can also import the symbolic
S_I*constants from the
Portability issues: chmod in perlport.