in reply to Rmtree with exclude
Hi,
Here is my quick work around, there may be efficient available.
use strict; use warnings; use Data::Dumper; use File::Find::Rule; use File::Path 'rmtree'; my $directory="/cache"; my @subdirs = File::Find::Rule->directory->in($directory ); print grep {!/$directory\/_.*?$/ and !/^$directory$/ and rmtree($_) } +@subdirs;
|
|---|