I would like to create a dir, but if it already exists, I would like to delete it first (along with all its contents).
Should I explicitly add if (-d ...)or is there a simpler mkdirone that already does this?
if (-d ...)
mkdir
You can use functions from the main module File :: Path :
use File::Path qw(make_path remove_tree); remove_tree('foo/bar/baz'); make_path('foo/bar/baz');
Source: https://habr.com/ru/post/1766213/More articles:mix list <; iframe> in C # - listУведомление о подключении Android - androidADOdb returns column names and numeric indices - phpExtract text from PDF to bookmarks - javaXcode: how to wrap a long line to the next line in the xcode editor - iphoneКак добавить гиперссылку на фоновое изображение? - htmlhow to change classes on click - jqueryRails model version control - ruby-on-railsкак изменить класс теговв jquery - javascriptHow to ensure that the property of the source data is retrieved from the context, and not from the cache? - iphoneAll Articles