in reply to how do i read in ANY 2d array

We've seen this question before. I answered at Re: How to make this code more flexible and actually showed how to make an ArrayOfArray a 2D structure and another type of structure a HashOfArray which used a letter for the row names because you had used that in another question. Arbitrary 2D, 5x5 6x9, 2x7 whatever you want, the code will do it. What didn't you understand about it?

Update: To boil it down as short as possible, this code will build a 2D array of whatever data is in the DATA segment.

#!/user/bin/perl -w use strict; use Data::Dump qw(pp); my @AoA; push @AoA, [split] while (<DATA>); print pp(\@AoA); __DATA__ 11 12 13 14 15 16 17 21 22 23 24 25 26 27 31 32 33 34 35 36 37 41 42 43 44 45 46 47 51 52 53 54 55 56 57