While there might be a
chgrp command in your OS,
Perl does not have a
chgrp() function. Perl only
has a
chown() function, which is used to set
both the user and the group id of a file. This is because many
Perl functions mimic the C library, and not the programs from
/usr/bin.
Also, there are 12 protection bits, not 9. You are forgetting
the "set user id", "set group id" and the "sticky bit".
Abigail