The only caveat I can think of with Data::Dumper is that the data is evaled. That could cause execution of evil code. However, since you are creating this data yourself, the decision to trust the data or not may require a little investigation into the general security of your box.

I am trying to figure out Storable as a result of your post. So far I have found that it appears to be much faster at storing arrays than Data::Dumper. When storing a hash, the both seem to be about the same speed. What I don't like aoubt it is Storable returns a reference to a hash or array instead of the actual data.

Oh yeah, there was a question:
If $reports{$year} and $reports->{$year} are different variables, and $reports->{$year} is a hash reference, then what is $reports{$year}?
From what little I know about it, a reference is just a scalar that points a different location. Kind of like pointers in C. $reports{year} (in relation to your original example) would be the data you created at the beggining of your script and $reports->{year} would be a reference (pointer) to the data that you read using Storable. They are two entirely different chunks of data and one can be changed without affecting the other.

In reply to Re: Re: Re: Storable with hash of hashes (reference problem?) by ChrisR
in thread Storable with hash of hashes (reference problem?) by ManyCrows

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.