I have a square matrix file, and I want to load it into Perl. I want to operate like 2 dimensional array which in C is like matrix[14][50], and then it goes directly to row 14 column 50. Is there a way to do this?
And can I modify the input file directly or I have to load it into a variable, do the operation and then write it out?
I have written a module which is likely able to do what you need.
Tie::Array::CSV. It creates a magical array of arrayrefs (a Perl 2D array), which allows row and element r/w access to a file. Depending on your column separator you might need to adjust the options (CSV is default).