You are not passing an array, nor an array reference, but a
stringified version of the array. You should
say: 'PrintArray2(\@FruitAoA)' or do what
tye says below.
You need an extra '$' in front of the AoA ('$#$AoA') since its
a reference. the print can be 'print "$$AoA...' or
'print "$AoA->...' or you can (either way you should take
another look through
perllol:
sub PrintArray2
{
my $AoA = shift;
for $aref ( @$AoA )
{
for $element ( @$aref )
{
print "$element\n";
}
}
}