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;
In reply to Re: Rmtree with exclude
by vinoth.ree
in thread Rmtree with exclude
by Mery84
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |