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!

In reply to mkpath (and rmtree) throw strange error when used in CGI by ibmman

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.