mkpath($path) unless -e $path;
The unless clause is not necessary here. Further, this would die if the path can't be created, so unless the OP wants this exception to propagate, it's maybe better written as
eval { mkpath($path) }; if($@) { ... }
In reply to Re^2: how to create the path automatically
by rovf
in thread how to create the path automatically
by baxy77bax
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |