sub PrintArray2 { my $AoA = shift; for $aref ( @$AoA ) { for $element ( @$aref ) { print "$element\n"; } } }