in reply to Problem with traversing a two dimensional array

Following up on what robby_dobby explained - you could re-write your print loop more perlishly, and allow variable dimensions :
sub printSand{ for my $inner_arrayref (@_){ for my $inner_element (@$inner_arrayref){ print $inner_element; } print "\n"; } }
Of course, it would be more efficient to join the inner element, and print them together, replacing the inner loop with:
print join("",@$inner_arrayref),"\n";
and get rid of the separate print newline.

        If your eyes hurt after you drink coffee, you have to take the spoon out of the cup.
              -Norm Crosby