in reply to File permission converter

You may also be interested in this example from the documentation for stat:
$mode = (stat($filename))[2]; printf "Permissions are %04o\n", $mode & 07777;
This gets the mode directly, and then uses printf to print it as an octal number.

Update: This example is from perl5.005_03's documentation. The documentation on PerlMonks is from 5.005_02.

Replies are listed 'Best First'.
Re: Re: File permission converter
by Centaurus (Novice) on Feb 15, 2001 at 04:47 UTC
    Thanks chipmunk! Did look at the documentation for stat.. but not see this sample. Appeared to me that you could only test the effective and real UID and GID permissions.