use File::Path 'make_path'; File::Path->make_path($path); chdir $path or die "Cannot chdir: $!"; #### VERSION This document describes version 2.08 of File::Path, released 2009-10-04.