You haven't provided any sample data, but a couple things look strange at first glance.

First, you have <IN> in three different places: the main "while" condition (which is normal), and in each of your subroutines. If it's true that the input data consists of multiple lines per data "record", it would be a good idea to document this using comments or POD in the code -- otherwise, it tends to look like a mistake.

Second, you are using a reference to a scalar variable as a hash key: $Tid{\$Tid} and this is almost certainly not what you really want. Curiously, you are sometimes using the actual scalar variable's value as the key, $Tid{$Tid} -- which is more likely what you should be doing all the time.

How about you try showing a little bit of sample data, along with what the output ought to look like given that input?

UPDATE: Oh yeah -- the reason for the warning message: You are using a new variable called "$Tid" in the final for loop for printing stuff out, but that's a new variable, so \$Tid (the reference to it) is a new memory address, and nothing has ever been assigned to the hash with that address as the key.


In reply to Re: multidimensional hash value seems to become unitialized by graff
in thread multidimensional hash value seems to become unitialized by adevans57

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.