use File::Path qw(make_path); make_path('path/to/dir')