And for handling nesting, etc, you can use File::Path which is distributed with Perl core.
In reply to Re^2: Porting Commands to Windows by skx in thread Porting Commands to Windows by Elegant