title: Perl array reference always rewrites over itself in a loop
body: <p>I am trying to read some numbers from a text file and store it as a 2 dimensional array. I read a line and push into another array as an array reference. But I noticed that main array only has last line in all rows. How can i correct this? Thanks in advance. This is part i do it.</p>
  
  <pre><code>open IN, "a.txt";
  @b=();
  
  while (&lt;IN&gt;)
  
   { 
    $t =$_; 
    @a = split /\s+/,$t; 
    push(@b, \@a); 
   }
  </code></pre>