First off, an useful hint that I can give you is that you can use (
forward) slashes under Windows too. Said this, I would just substitute (
s/// read about it in
perldoc perlop - it's quite an ubiquitous operator in Perl)
"reports" for the wanted output directory. Then rumors have it that
File::Path will automatically create directories recursively for you.