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

What about rmtree?
use File::Path qw(rmtree); rmtree($dir);
File::Path and File::Path::Functions are great to use when you're looking for perl solutions to file management, and want to avoid system-specific issues.

Originally posted as a Categorized Answer.