for (@comdemnedFilesOrDirs){ if( -f && !unlink or -d _ && !rmdir ){ # change permission here (uncomment as appropriate) # chmod( nnn, $_ ) # Win32::FileSecurity::Set( $_, Win32::FileSecurity::MakeMask( qw( CHANGE ))) and redo; } }