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