use File::Find; finddepth sub { -d $_ and rmdir $_ }, "yourtopoftree"; [download]
should work to remove empty directories.
In reply to Re: File::Find help by tybalt89 in thread File::Find help by colox