Assuming weather.rb and w_data.dat are in the same folder, run this program in Terminal: ruby weather.rb Assuming soccer.rb and soccer.dat are in the same folder, run this program in Terminal: ruby soccer.rb
min_difference.rb makes this problem generic. It has a generic function to find the smallest difference. Takes file path, column names with offsets, and a key column for identification