Just ignore the errors you get when it's not empty, and make sure you do it in depth-order first.use File::Finder; File::Finder->depth->eval{ sub { rmdir } )->in(@your_top_level_dirs);
-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.
In reply to Re: Need to delete empty directories.
by merlyn
in thread Need to delete empty directories.
by sashac88
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |