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.
chmod 0655, $file1, $file2, @other_files, get_more_files();
jdporter
The 6th Rule of Perl Club is -- There is no Rule #6.