in reply to Re: How do I delete a directory without emptying it first?
in thread How do I delete a directory without emptying it first?

To make your example a bit shorter you could go for:
use File::Find; finddepth( sub { (-d) ? rmdir : unlink }, $directory);

But I would recommend using File::Remove as per my example.

gav^

  • Comment on Re: Answer: How do I delete a directory without emptying it first?
  • Download Code