I have a script that extracts large amounts of data on which it often needs to perform calculations. For example, it might extract the ages of 100 people and then output an average age. I don't know much about object-oriented programming, but it looked like it might be a good way to store and manipulate data within the script; so, I could extract the ages, making each person an object, and then do the calculation, and then output the average. Is this feasible/reasonable? The other option is creating a database and doing the calculations within, but why add 100 values to a database when all I really need is the average? Also, it might give me an opportunity to learn about object-oriented Perl. If anyone has any advice I would be much indebted.

In reply to Handling large amounts of data in a perl script by sjwnih111

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.