use File::Find; use Win32::FileSecurity; #determine the DACL mask for Full Access my $fullmask = Win32::FileSecurity::MakeMask('FULL'); &find(\&wanted,"\\"); my %users; ## Note: use return not next from a subroutine ## with warnings enabled perl will remind you of this sub wanted { # Win32::FileSecurity::Get does not like the paging file, skip it return if ($_ eq "pagefile.sys"); return unless -f $_; ## Do the get in an eval block and return 1 if it succeeds. ## Otherwise ignore the problem and go onto the next file. return unless eval{ Win32::FileSecurity::Get($_, \%users); 1 }; return unless defined $users{"Everyone"}; return unless $users{"Everyone"} == $fullmask; print "$File::Find::name\n"; }