for my $row (@array) { for my $col (ref($row) ? @$row : $row) { print $col, "\n"; } }
This assumes the elements at the same level as the array can't be references.
In reply to Re: How to print an array of multidimensional arrays with a for or foreach loop
by ikegami
in thread How to print an array of multidimensional arrays with a for or foreach loop
by thanos1983
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |