in reply to Re: File::Path::rmtree: What am I not grokking?
in thread File::Path::rmtree: What am I not grokking?

Nicely thorough. Along the lines of my other reply,

use File::Spec::Functions qw( splitpath splitdir catpath catdir ); sub unmkpath { my ( $path ) = @_; my ( $vol, @dir ) = do { my ( $vol, $dirs ) = splitpath( $path, 1 ); ( $vol, splitdir $dirs ); }; pop @dir while @dir and rmdir catpath $vol, catdir( @dir ), ''; }

Update: fixed a couple typos and a minor forgeto.

Makeshifts last the longest.