Hi poj, thank you for the quick reply! Just so I'm sure I'm trying this correctly, do you mean I should use only this loop? Or, add this loop to my code?

I've tried it both alone and combined with one of my loops (below) (this one)

for $structs (@structs) { make_path "/media/RAIDstorage/home/results/$structs"; }
but in both cases it behaves weird. It still complains for the same uninitialized value, but it does go ahead, in both cases, and creates some directories, however it's not what I want to get in the end.

It puts AB0001 in struct1 (correct) but instead of putting BC0001 in struct2, it puts AB0002. I tried increasing the lengths of the string to check for such a behaviour. It's probably wrong because I either did something wrong or I failed to explain what I want to get in the end. I want all AB0001, AB0002, AB0003 and so on to go into struct1 and all BC0001, BC0002, BC0003 and so on, to go into struct2

I'm really, really sorry to be a pain - if anyone can point to what might be happening...? I don't get it because $structs is initialised so I don't know why it's complaining. And also it's confusing me how to get the subdirectories in correctly.


In reply to Re^5: make_path for creating directory tree by Anonymous Monk
in thread make_path for creating directory tree by fasoli

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.