Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
hi everyone i am trying to chmod a few files through my perl script, i want to know if there is a way to chmod a group of files (4 files to be exact), right now i am doing it as chmod (655, $File1); within my script, but seems like this is not working either.. can anyone help
thank you
I'm kind of surprised it didn't occur to you to read the documentation for the chmod function. It would have answered both your questions.
You can supply any number of files in the list, not just one.
The mode number is not assumed by perl to be octal. If you want to represent the value in octal, you have to write it properly. That means giving a leading zero.