Hi Ivancho,
Q: Perhaps you ought to be increasing {TTAT}{I1}, ie {$item2}{$tid}
A: I can't do that, cause it will miss counting "TTTT". if what you mean is changing them to this:
$$transaction_map_ref{$item2}{$tid}++;
Q:or possibly {TTTT}{I2}?
A:I don't get what you mean by that. What's the difference with the above statement.
Sorry..I'm rather slow here..
Q:can you have repeated elements in your array, and if so, what should be the behaviour?
A: Yes if that's the case, as long as condition "hd<=$d", they should be counted.
I hope that clarifies the problem.
Regards,
Edward

In reply to Re^2: Element Count from Array to HoH by monkfan
in thread Element Count from Array to HoH by monkfan

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.