If I understand correctly, you have several records. Each record has two searchable criteria, the speaker name and a category. Furthermore, each category can contain multiple topics. You want to store this in a Perl data structure that will allow you to search on multiple criteria?
You could store these as anonymous hashes in an array, and loop over them all to search. The category itself would have to contain an anonymous hash.
You could store them all in a tied hash, keyed on some sort of unique identifier. You'd have to build up an index for each criterion, associating the unique identifier with all records in whatever type. MLDBM would be very helpful in this instance.
In other words, it sounds like you're reinventing a relational database. Hie thee to MySQL or Postgres.
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.