FAQ

On Fri, Aug 18, 2006 at 06:29:36AM -0700, chen li wrote:
Dear all,

I have an array of array look like this:

@array_of_array=(

[1,2,3,4,5],
[1,2,3,4,5],
[1,2,3,4,5],
[1,2,3,4,5]
)

How do I get the total values for each colume, such as

$column1=1+1+1+1;
$column2=2+2+2+2;
$column3=3+3+3+3;
Hi,

it might be smart(depends on utilization) to keep the sum as the 0th
element of each row. Like an old turbo pascal implementation of
strings did ;-)

Have a nice day,
-- Dalibor

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 6 of 9 | next ›
Discussion Overview
groupbeginners @
categoriesperl
postedAug 18, '06 at 1:29p
activeAug 19, '06 at 3:44p
posts9
users7
websiteperl.org

People

Translate

site design / logo © 2022 Grokbase