Hi, I cannot figure out how to create a HoH (or even HoHoH) from a file in + following format: path start end delay ---------------------------------------------------------- my_path /path/3434/some_txt wodo -445 your_path /path/3434/some_txt wodo_modo 41 my_path2 /path/232/wge45 wodo_modo 240 my_path /t43/annow23x /a/b/c/43 NA ... Each line above corresponds a "record" and belongs to a "path". So a "path" can include several "records". Above, "my_path" includes 2 records, ie. 1st and 4th lines. I just want to store all lines above into a single hash in the form of: $db_hash{$path}{<index_for_corresponding_path>}{START} $db_hash{$path}{<index_for_corresponding_path>}{END} $db_hash{$path}{<index_for_corresponding_path>}{DELAY} For ex, 1st line will be: $db_hash{my_path}{1}{START} = "/path/3434/some_txt" $db_hash{my_path}{1}{END} = "wodo" $db_hash{my_path}{1}{DELAY} = "-445" ... $db_hash{my_path}{2} must be generated from the 4th line and so forth. The number of "paths" are determined during runtime, thus I must also determine indices for each "path" on runtime. The number of members in each "path" can be different. My question is, how to create index for each unique $path key? I shall create a separate array of indices, shan't I?

In reply to Creating members of hash of hashes parallelly by utku

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.