in reply to Re: UNIX File Permissions equal or less than conditions
in thread UNIX File Permissions equal or less than conditions

So the changes:

my $DANGER_BITS = 0022; my $dangerBitCheck = ( $permissionsMask & $DANGER_BITS ); if ($dangerBitCheck) { print "FAIL\n"; }

Replies are listed 'Best First'.
Re^3: UNIX File Permissions equal or less than conditions
by Themis74 (Initiate) on Sep 18, 2013 at 00:03 UTC
    All -- thanks for the insight. I ended up with
    if ($mode & 07022) { ... }
    (I also want to check for setuid/setgid/sticky.) I knew that bitwise was the best way to go, thanks for setting me back on the path.