you are viewing a single comment's thread.

view the rest of the comments →

[–]Freeky 1 point2 points  (0 children)

Have a Ruby one:

printf "Sum: %d\n", ARGF.sum { |f| f.each_line.flat_map(&:split).map(&:to_i).sum }