title: Looping through 2D array in Perl?
body: <p>If I have a 2D array, how can it be possible to access an entire subarray inside of loop?  Right now I have</p>
  
  <pre><code>foreach my $row(@data){  
   foreach my $ind(@$row){  
    #perform operations on specific index  
   }  
  }
  </code></pre>
  
  <p>but ideally I'm looking for something along the lines of </p>
  
  <pre><code>foreach my $row(@data){  
    #read row data like $row[0], which if it has the data I'm looking for  
    #I can go ahead and access $row[3] while in the same row..
  }  
  </code></pre>
  
  <p>I'm fairly new to Perl so might just not understand something yet, but I keep "Global symbol "@row" requires explicit package name" when trying to use it the way I want to.</p>