I kindly request your assistance...
I was experiencing some very strange behavior while trying to use mkpath to create a number of directories in a cgi app (using cgi::application). It seems that the directories were successfully created, but it dies when the method goes to return with a malformed header error- which showed 'mkdir' and the start of one of the paths. This is with verbose on or off, and regardless of if I store the return value of mkpath. It does not happen when no directories need to be created. I tested a number of options by then using rmtree to delete the directories (which shows the same error, but with rmdir) and really couldn't figure out what was going on.
I was going to try to write the header manually, but cgi-application usually takes care of that, and I've no idea how it could be getting messed up.
Luckily, I won't need to use the method often, and the directories did get created, but it still seems like a good idea to try to debug it in case it is needed again in the future. Thank you!