I can delete empty directory with rmdir.
Since if I delete some directory -it's parent directory can become empty-I need to delete it too.
Thus what I need is loop of deletions of empty directories.
However I want to limit this loop to the maximum deepness.
Thanks in advance.
Comment on Re^2: Need to delete empty directories.
use strict;
use File::Find;
my @topdirs = @ARGV;
my @rmdirs;
find( sub { -d and push @rmdirs, $File::Find::name }, @topdirs );
rmdir for reverse @rmdirs;