This is a bit of a tangent, but this is how I would actually solve the problem in Ruby:
#!/usr/bin/env ruby
require "csv"
puts CSV.foreach(ARGV[0], headers: true).sum { _1[1].to_f }.round(2)