Well, we don't have those modules installed, otherwise I'd be happy to use them :). So let me ask this, how do I create an array of dynamically named arrays?

Well, you almost certainly do *not* want dynamically named arrays. You more likely want either an array of array-references (probably anonymous arrays), or a hash of array-references. Or perhaps something altogether different -- we can't possibly know what you really want because you still have not adequately described what it is you are really trying to do. Use what fields in file1, and compare them to what in file2, and for what purpose? generate a report? sort one file according to a field in the other? merge into one file ordered by some field? delete data in file2 based on some user specified criteria that links to related data in file1?

You may think you are presenting a simplified problem for us to help solve by omitting the larger picture and asking for specific implementation details, but you are incorrect in that assumption. Dynamically named variables are almost always the wrong answer, so rather than have us help you solve the wrong problem, you'd be better served to be more explicit in stating what you hope to achieve beginning with describing the data files, any other inputs the program is to receive, what the program is supposed to do with all of its input data and files, and following through with a description of the output you would like to arrive at. Do no hesitate to state the why's as well as the what's.


In reply to Re: Re: Re: Re: Re: comparing array values or? by danger
in thread comparing array values or? by Anonymous Monk

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.