Just remove them. If they're not empty, rmdir will fail. In this case, you don't care that it fails, ignore the error, and keep going.
use File::Find; finddepth(sub { rmdir $_ if -d }, $some_path);
Update: added 'depth' as per merlyn's correction.
In reply to Re: Find Empty directories and removing it
by Tanktalus
in thread Find Empty directories and removing it
by jesuashok
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |