in reply to mkdir in loop - overwrite danger?

Don't worry, the help for mkdir (on Linux anyway!) says :-

Create the DIRECTORY(ies), if they do not already exist.

You might want to use File::Path instead, as make_path returns the number of directories created.