in reply to Re: Efficient way to sum columns in a file
in thread Efficient way to sum columns in a file
At only about 50% slower than the fastest solution, its brevity and adaptability might recommend it.time perl -nle'my $i=0;$a[$i++]+=$_ for (split/,/);END{print join "\t" +, @a}' numbers.csv
|
|---|