my $Grand_Total = 0; for $i ( 0 .. $#AoA ) { $row = $AoA[$i]; for $j ( 0 .. $#{$row} ) { $Total_Balance[$i] += "$row->[$j]"; } print "the total is: ($Total_Balance[$i])
\n"; $Grand_Total += $Total_Balance[$i]; } print "Grand Total is: ($Grand_Total)
\n" _