[PLUG] Perl 3D array - printing all values
Matt Alexander
m at pdxlug.org
Wed Oct 22 13:13:01 UTC 2003
This should be an easy one for you Perl gurus... ;-)
I have a 3 dimensional array in Perl...
$myarray[$val1][$val2][$val3]
I would like to print every value in the array. I could construct 3
for-loops to loop through each of the 3 dimensions, but I don't know the
max index of each dimension. Is there a way to find the max index for
each dimension? Or is there an easy way to loop through all values in a
multi-dimensional array?
Thanks,
~M
More information about the PLUG
mailing list