But isn't there a more perlified way to do it using map or X? Surprisingly, searches have not turned up much except a down-voted answer on stack overflow.my @arr; for my $i (0..$n-1) { for my $j (0..$m-1) { $arr[$i][$j] = 0; } }
In reply to Initialize a 2D array with zeros by cormanaz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |