in reply to Re^2: File::Find help
in thread File::Find help
Whenever you find a directory, remember it to be deleted afterwards?
my @to_be_deleted; File::Find( ..., sub { if( -d $File::Find::name ) { print "'$File::Find::name' should be deleted later\n"; # push @to_be_deleted, $File::Find::name; }; }; rmdir @to_be_deleted; # boom
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: File::Find help
by colox (Sexton) on Dec 02, 2017 at 13:19 UTC | |
by marto (Cardinal) on Dec 02, 2017 at 13:29 UTC | |
by colox (Sexton) on Dec 02, 2017 at 13:44 UTC | |
by poj (Abbot) on Dec 02, 2017 at 13:49 UTC | |
by colox (Sexton) on Dec 02, 2017 at 13:52 UTC |