Basically I want a 9 by 9 matrix that hold an array instead of just a scaler.
for my $row (0..8) { for my $col (0..8) { my @record = ...; $data[$row][$col] = \@record; } }
If the above "..." is built using a loop, you can avoid the intermediary variable @record:
for my $row (0..8) { for my $col (0..8) { for my $x (...) { push @{ $data[$row][$col] }, $x; } } }
In reply to Re: Multi-dimensional arrays...
by ikegami
in thread Multi-dimensional arrays...
by nothign
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |