Hi toolic, that is great you speak Verilog. May be, I can seek some help with my hash described below from the original code :)

Here is a very basic question I have. Perhaps, I did not ask the core of my question earlier, correctly and got lost in the details:

In lines 47 through 49, I have the following code, where I am printing keys:

47 foreach my $signal (keys %{$inTimeRangeSignalsH{$vcdFile}}) { 48 print "Line 48 ::Dbg:: $signal $vcdFile\n"; 49 }

Further down in my code in lines 61 through 65, I am again printing the same keys and expecting that I get the same keys are the result (order of results is not important).

But unfortunately, that expectation does not seem to be true.

Why are the keys from the same hash different, when printed using lines 48 through 49 and lines 61 through 65?

61 foreach my $vcdFile (keys %inTimeRangeSignalsH) { 62 foreach my $sig (keys %{$inTimeRangeSignalsH{$vcdFile}}) { 63 print "Line 63 ::Dbg:: $sig $vcdFile\n"; 64 } 65 }

Any insights/corrections will be a great help.


In reply to Re^2: Why are Hash keys different for the same hash? Confusing. (VCD) by Anonymous Monk
in thread Why are Hash keys different for the same hash? Confusing. by Anonymous Monk

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.