Get someone else to do the work for you - use a module...

I'd say take that advice with a grain of salt... For things that are basically pretty simple -- easy to set up and easy to validate, like the OP's case -- it can be quicker and more reliable to roll your own. A module posted by someone else may have been written to do a slightly different task, and finding that out, and figuring out whether/how it can be shoe-horned into your particular task, might end up being more work with a less satisfying outcome.

But for the harder things that make you scratch your head and say "I'm not sure how to solve this", definitely go to CPAN and look for help. Even if there is no single module that does exactly what you need, you're likely to learn about how to break the problem down into manageable chunks, and/or find useful references, and so on.


In reply to Re^2: Converting a Flat-File to a Hash by graff
in thread Converting a Flat-File to a Hash 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.