Show us the input file Table1.txt.
Here you are splitting the input line based on tab delimiter and collecting the first element[0] in  $key
my $key = (split/\t/, $line)[0];
Here you are pushing every line that has the same key into an array
push @{ $hash{$key} }, $line;
There can only be unique keys in such a data structure. UPDATE
while(<DATA>) { chomp; my $line = $_; my $key = (split/\s+/, $line)[0]; push @{ $hash{$key} }, $line; } print Dumper(\%hash); __DATA__ NM_001127328 202502_at NM_000018 200710_at NM_000019 205412_at NM_001111067 203935_at NM_000023 210632_s_at NM_000027 204332_s_at NM_000027 204333_s_at NM_000027 216064_s_at NM_000029 202834_at NM_000031 218487_at NM_000031 218489_s_at NM_000032 211560_s_at NM_000036 206121_at NM_000042 205216_s_at NM_000043 204780_s_at NM_000043 204781_s_at NM_000043 215719_x_at NM_000043 216252_x_at NM_000044 211110_s_at NM_000044 211621_at
prints...
$VAR1 = { 'NM_000032' => [ 'NM_000032 211560_s_at' ], 'NM_000044' => [ 'NM_000044 211110_s_at', 'NM_000044 211621_at' ], 'NM_001111067' => [ 'NM_001111067 203935_at' ], 'NM_000023' => [ 'NM_000023 210632_s_at' ], 'NM_001127328' => [ 'NM_001127328 202502_at' ], 'NM_000031' => [ 'NM_000031 218487_at', 'NM_000031 218489_s_at' ], 'NM_000043' => [ 'NM_000043 204780_s_at', 'NM_000043 204781_s_at', 'NM_000043 215719_x_at', 'NM_000043 216252_x_at' ], 'NM_000029' => [ 'NM_000029 202834_at' ], 'NM_000042' => [ 'NM_000042 205216_s_at' ], 'NM_000019' => [ 'NM_000019 205412_at' ], 'NM_000018' => [ 'NM_000018 200710_at' ], 'NM_000027' => [ 'NM_000027 204332_s_at', 'NM_000027 204333_s_at', 'NM_000027 216064_s_at' ], 'NM_000036' => [ 'NM_000036 206121_at' ] };

In reply to Re^3: Load a file into hash with duplicate keys by umasuresh
in thread Load a file into hash with duplicate keys by sophix

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.