in reply to Problem with traversing a two dimensional array
Of course, it would be more efficient to join the inner element, and print them together, replacing the inner loop with:sub printSand{ for my $inner_arrayref (@_){ for my $inner_element (@$inner_arrayref){ print $inner_element; } print "\n"; } }
and get rid of the separate print newline.print join("",@$inner_arrayref),"\n";
If your eyes hurt after you drink coffee, you have to take the spoon out of the cup.
-Norm Crosby
|
|---|