The Perl 5 module File::Path::Tiny provides recursive versions of mkdir() and rmdir() with as little code and overhead as possible.