in reply to Initializing multidimensional arrays
ormy @two_d = ( [(undef) x 5], [(undef) x 5], [(undef) x 5], [(undef) x 5], [(undef) x 5], );
It's tempting to try the x 5 trick a second time to fill the top level, but that gets you five references to the same row.my @two_d; push @two_d, [(undef) x 5] for 1 .. 5;
Replace (undef) with (0) if that's what you prefer.
After Compline,
Zaxo
|
|---|