use Path::Class qw(dir); dir("foo", "bar")->mkpath;