"... just an example I gave. The real files are not ..."

The last two paragraphs that I wrote were intended to convey the idea that I understood this.

"I'm still learning (and eager to learn) the language of Perl ..."

Well, you've certainly come to the right place. :-)

"... and I'm realizing I still have a long way to go."

It shouldn't be too hard to get a handle on the basics. Take a look at perlintro: as well as having those "basics" on that page, it is also peppered with links to additional information and advanced topics (I'd suggest following these as the need arises rather than trying to learn it all at once).

"... automatic [whatever] code generation ..."

Perl is an excellent language for this type of task. You can also generate Perl code; here's a rough example of one way you could do this:

my $generated_function = generate_function(...); $generated_function->(); sub generate_function { ... return sub { ... }; }

You might also find "Template Toolkit" is worth a look.

— Ken


In reply to Re^3: Adding items to arrays: best approach? by kcott
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.