chmod 0755, "fred", "barney";
As with many of the operating system interface functions,
chmod returns the number of items successfully
altered, and when used with a single argument, sets
$! in a sensible way for error messages when it
fails. The first parameter is the Unix permission value (even for
non-Unix versions of Perl). For the same reasons we presented earlier
in describing mkdir, this value is usually
specified in octal.