in reply to Perl API that emulates mkdir -p on unix?

Path::Class is also capable of this, if you prefer an OO interface. See its documentation on the $dir->mkpath method.
use Path::Class qw(dir); dir("foo", "bar")->mkpath;