in reply to Perms Perms Perms
$userPerm is your command line argument
my $flags = $folder_ace|$subfolder_ace, ACCESS_ALL +OWED_ACE_TYPE, OBJECT_INHERIT_ACE | CONTAINER_INHERIT_ACE; if($userPerm eq 'READ') { $flags |= READ; } elsif($userPerm eq 'WRITE') { $flags |= WRITE; } $perms->Add('MYDOMAIN\bloggJo', $flags);
I've kept this verbose for clarity.
Your basic problem is that 'constants' in Perl are actually calls to subroutines, which return a constant value. And as the 'READ' or 'WRITE' arguments from the command line are simply text strings, they aren't then interpreted as constants.
So you need to 'translate' the command line args into calls to the relevant perl 'constants'.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Perms Perms Perms
by blackadder (Hermit) on Sep 13, 2002 at 12:29 UTC |