in reply to Perms Perms Perms

I hesitate to give this "solution", but you can generate code to execute in Perl. It's a dangerous practice, but it is possible.

I've not tested this, but you _should_ be able to replace your call to Add() with something like:

eval( '$perms->Add(\'MYDOMAIN\\bloggJo\', ' . $folder_ace . " | " . $subfolder_ace . ' ACCESS_ALLOWED_ACE_TYPE, OBJECT_INHERIT_ACE | CONTAINER_INHERI +T_ACE );' );

uhhh... don't do this... There are lots of issues. Use the other suggested solutions instead, you'll definitely want to check that the values passed in are valid constants anyway, so why do this.

Thought I would point out the flexibility of Perl here.