tipu123 has asked for the wisdom of the Perl Monks concerning the following question:
finddepth (\&remove_dir, "$path"); rmdir ( "$path" ) or die ("Could not remove $path"); sub remove_dir { # for a path, this will be 0 if ( ! (stat("$File::Find::name"))[7] ) { $ftp->rmdir("$File::Find::name"); } else { $ftp->unlink("$File::Find::name"); } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Recursive delete files using perl script
by x-lours (Sexton) on Jun 30, 2014 at 14:14 UTC | |
by kennethk (Abbot) on Jun 30, 2014 at 15:17 UTC | |
|
Re: Recursive delete files using perl script
by Corion (Patriarch) on Jun 30, 2014 at 13:23 UTC |