in reply to Initializing multidimensional arrays

my @two_d = ( [(undef) x 5], [(undef) x 5], [(undef) x 5], [(undef) x 5], [(undef) x 5], );
or
my @two_d; push @two_d, [(undef) x 5] for 1 .. 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.

Replace (undef) with (0) if that's what you prefer.

After Compline,
Zaxo