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

It depends entirely upon how the data is stored in the file.

For a matrix stored such that the rows are white-space delimited, and columns newline delimited, then this does the trick:

my @matrix = map[ split ], <$filehandle>;

Though if the file/matrix is of any substantial size, then this may be preferable:

my @matrix; push @matrix, [ split ] while <$filehandle>;

Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.