in reply to how to check permissions

If you have the camel book see page 801. If not, here is the code:

$mode = (stat($filename))[2]; printf "permissions are %04o\n", $mode &07777
This will send back to you the usual UNIX-style permissions - once you have them - you can then interrogate them as you wish.

Replies are listed 'Best First'.
Re^2: how to check permissions
by Anonymous Monk on Feb 16, 2018 at 07:07 UTC
    how to factor in the sticky bit while getting the permissions?

      Did you try the code which brother draconis helpfully copied out for you? In what way are you unable to determine the sticky bit from that?