in reply to A Question with Nesting Arrays

You can use arrays of arrays of course, but if your dimensions are fixed, known, and consistent, why not just use two- or three- dimensional arrays and be done with it?
my @array = (); my $index_x = 0; my $index_y = 0; my $index_z = 0; {...} $arrays[$index_x][$index_y][$index_z] = 52;

Replies are listed 'Best First'.
Re^2: A Question with Nesting Arrays
by jethro (Monsignor) on Dec 07, 2013 at 02:11 UTC
    You hopefully are aware that your three dimensional array (at least in perl) is still an array of arrays. It sounds like you think of them as something different.

      Yes, internally. But it has been my experience that newcomers to the language can wrap their heads around the multidimensional syntax more quickly than diving straight into indirect references.

      And this is my third attempt to post this answer; for some reason, PerlMonks doesn't seem to want me to say this. If it fails a third time, I will surrender. :-)