#! perl -slw
use strict;
my @colnames = split ' ', <DATA>;
my @totals;
while( <DATA> ) {
my @cols = split;
$totals[ $_ ] += $cols[ $_ ] for 0 .. $#cols;
}
printf "%10s:%u\n", $colnames[$_], $totals[$_] for 0 .. $#totals;
__DATA__
alpha beta gamma delta
1 2 3 4
5 6 7 8
9 10 11 12
Produces: C:\test>junk
alpha:15
beta:18
gamma:21
delta:24
With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
i |