in reply to 2d Array - making an array for the column then adding the values
sub score_count { my @arr = shift; my $total = 0; foreach my $score (@arr) { print "@$score "; foreach my $i (@$score){ $total += $i; } } print "$total\n"; return $total; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: 2d Array - making an array for the column then adding the values
by ikegami (Patriarch) on Sep 21, 2009 at 02:31 UTC | |
|
Re^2: 2d Array - making an array for the column then adding the values
by hansoffate (Novice) on Sep 21, 2009 at 02:37 UTC | |
by desemondo (Hermit) on Sep 21, 2009 at 02:48 UTC |