in reply to Re: looping in 2d array
in thread looping in 2d array

So $textarray[1, 2, 3, 4, ...] are the words, $textarray[2][1, 2, 3, ... 9] are the grammar codes ...

NB: The Perlish syntax for these slices is (something like)  @textarray[1, 2, 3, 4] and  @{ $textarray[2] }[1, 2, 3, 7 .. 9] respectively.