in reply to Logic-Based Permission Check

"chgrp" and "chmod." Are there built-in perl commands to execute these?
chgrp (no), chmod (yes).

See also:

Replies are listed 'Best First'.
Re^2: Logic-Based Permission Check
by Laurent_R (Canon) on Jul 30, 2013 at 21:23 UTC

    Use the built-in chmod command rather than system calls. The first element in the list must be un numerical mode and must be an octal number (and not a string containing the number). Also, contrary to what you would do at the shell prompt under U*ix, don't forget the comma between the mode and the list of files (I once wasted half an hour before I figured out that).

    In brief, the typical syntax should be something like this:

    chmod 0755, $file1, $file2, "foo.txt";

    Check also for the chown function.