Hi all....
I need some help using references.  I�m using Perl v5.6.1 built 626 provided by ActiveState.

Here is where i�m stuck:

---Code (simplified) ---

use Win32::FileSecurity qw(Get Set);

sub SetACLs
{
    foreach (@_) <------ How should I do to pass to the foreach my referenced array at the sub call???????
    {
        if ((!(-e $_)) || (!(Win32::FileSecurity::Get($_, \%hash )))) {print "Error accessing ACLs for $_\n"}
        else
        {
            $hash{'Everyone'} = $_[1];
            if (!Win32::FileSecurity::Set( $_, \%hash )) {print "Error setting ACLs at $_\n"}
        }
    }
}

##main##
$readDir = 2685534377;
@READDIR= qw(
    C:\WINNT
    C:\WINNT\SYSTEM
    C:\WINNT\SYSTEM32
    C:\WINNT\SYSTEM32\DRIVERS
    C:\WINNT\SYSTEM32\SPOOL
    );

&SetACLs(\@READDIR,$readDir); <--- Here is where i pass the referenced array to my subroutine


If anyone could help me, thanks in advance

Ariel

Reply via email to