use File::Path; use Path::Class::File; my $pcd = Path::Class::Dir->new('test_dir', 'test_subdir'); make_path($pcd)