Thanks for the reply. I don't think my requirements are particularly unusual, just that I am not doing it right.

I have a sample that has multiple tests. When a test is assigned to a sample it has a temporary id. After it is verified it is given a permanent id.

I want to put the tests in the hash indexed by their ids for quick retrival by their id and change the id when necessary.

Did I mention that sample and test are objects (kind of - as I don't have any OO training they are quite quasimodo in their OOness). Which means if I normalise and the test id is set in the sample object then I cannot access that id from the test object.

I am probably making things too hard for myself. I have read some of the OO tutorials, but when I get to the bits that I don't know and (definitely) need the language of the tutorial suddenly becomes "encrypted". I'll keep trying.

Thanks again

In reply to Re^2: Dynamic hash keys by markdibley
in thread Dynamic hash keys by markdibley

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.