in reply to Passing arrays

Well, I had to do something similar to this recently. This is the code that i used to read my input from a file into an array or arrays, aka a matrix. This was the subroutine to put it into a matrix, which other subs then moved about, ultimately putting into another file. Hope it helps some.
open FILE, "<input.txt"; open OUTP, ">output.txt"; undef (@matrix); while (<FILE>){ push @matrix, [split]; } &dataconvert; # this is where it branched off to #change up the data select OUTP; for $i (0.. ($#matrix)){ print "@{$matrix[$i]} \n"; }
It simply pushed the contents of the file into a matrix using push. I hope this helps you out a bit.