$sum += (split(/,/))[5];
While indexing in this fashion is useful, I think the @F method would be faster in this case.
In reply to Re: Efficient way to sum columns in a file
by eibwen
in thread Efficient way to sum columns in a file
by sk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |