in reply to Re^2: Question about returning array from sub
in thread Question about returning array from sub

You still don't quite have the concepts. There is only a "2-D array" in Perl. See a post from today from Monk::Thomas with some awesome ASCII art depicting Perl arrays.

At the end you said: I return the array of array of references ...

Should be: "the array of array references" or "the array of arrayrefs" or "the array of references to arrays" ...

As for your latest code: (first I would recommend testing with a minimal script like the one I posted above. Then when you have it figured out, start plugging your own code/data back in)

(for each of two ...)

Hope this helps.

Remember: Ne dederis in spiritu molere illegitimi!