in reply to Re: Re: Help making a directory tree
in thread Help making a directory tree

Merlyn's solution is better, but the directory already existing is why it checks the error message:
if ($! !~ /exists/i) { die "Couldn't mkdir($dirsofar): $!"; }
As long as the error message contains the word "exists", it will just ignore the error and continue on. I tested this case, and it worked fine for me. If it doesn't work for you, I'm curious what error message it prints...