in reply to How to print an array of multidimensional arrays with a for or foreach loop
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.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: How to print an array of multidimensional arrays with a for or foreach loop
by thanos1983 (Parson) on Aug 11, 2014 at 01:22 UTC | |
by ikegami (Patriarch) on Aug 11, 2014 at 01:46 UTC | |
by tobyink (Canon) on Aug 11, 2014 at 08:02 UTC |
In Section
Seekers of Perl Wisdom