Hello Ken,

Thanks for your appreciation. I'm trying to be as clear as possible when asking questions. And in the meantime, I'm also learning the syntax to be used in messages, like showing the real name and also the username (or how do you call it with PerlMonks?): see the start of this reply... :-)

I'm definitely taking all the great advice given by many people here into account. I've already changed my script in many ways. And indeed, the testx was just an example I gave. The real files are not incremental by numbers but totally different names in totally different (sub)directories. I just wanted to point out the difference between how to extend arrays.

I've also seen Perl has a zillion modules/libraries that do a lot of the hard work behind the scenes. One of them is indeed File::Spec but there are more, lots more...

I'm still learning (and eager to learn) the language of Perl and I'm realizing I still have a long way to go. But by practicing it step by step I'm convinced I'll be able to do whatever I want it to do (this might be an "overstatement"... :-)).

Maybe little bit saying why I'm using Perl for the moment: automatic Java code generation. I'm using XML files as input and using the amazing Text::Xslate and XML::LibXML::Simple Perl modules together with appropriate code templates to generate that code. It's a bless!!!

Best,
--Geert


In reply to Re^2: Adding items to arrays: best approach? by geertvc
in thread Adding items to arrays: best approach? by geertvc

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.