Delimited data organization might seem tempting, especially if the concept of references is a little foreign. But I think you will find that in general, manipulating data internally using records is good, and internally using just delimited data in an array is bad, unless your data is very simple. In a complex record structure, each atom of data has a location, which can't be said for the delimited data; it requires you to create temporary variables and use split every time you need access to something. There is also the problem of quoting/escaping data so it doesn't interfere with the delimiter. Given that your record structure is intelligently organized (it seems that way so far), you really can't go wrong. Once you really come to understand Perl's way of handling references, you will find very little data that you can't model inside your program with complex structures. The same can't be said for a delimited array.

See perlreftut for more info.

blokhead


In reply to Re: Re: Re: Records question by blokhead
in thread Records question by dave8775

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.