http://www.perlmonks.org?node_id=1066058


in reply to A Question with Nesting Arrays

At the moment you store everything into only one file because the increment of $count happens outside both loops. We might better understand your problem if you showed us the input and the expected output of a smaller problem, with 5 instead of 1553 strings and only 3 runs for example

Should you be looking for information about matrices, in perl they are called Arrays of Arrays or AoAs, Dense but concise information about them can be found for example in perllol and perldsc