Hi there.

I have a fairly basic question. I hope this is the right place for it.

I have a 4 column table: the first column is the inhouse ID of an individidual, the second is the family ID, the 3rd is an external ID and the last column give me some additional information about that person.

I'm looking for a way (an existing module, object type...) to access any column I want given any ID I give in. For example, I have the inhouse person ID, and I want the family ID (for simplicity suppose all these IDs occur only one in the entire table). For the moment I tackled this issue by making a complex hash structure, bit it looks a bit convoluted and I'm looking for a more elegant, less error-prone way to code this. I was imagining an object type where you have methods like ''inhouse2family" so I can get what I want by typing:

 my $family_ID = $object->inhouse2family(<inhouse ID comes here>)

I was just attempting to make an object (it would have been my first object I write) that does something like this, but it felt like a 'basic' feature that maybe someone else already found an elegant solution for. Does anyone know one?

Thanks!

In reply to Looking for an existing package to crosslink different IDs with each other by colicab

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.