From: Kev Date: 2007-03-09T18:15:08+09:00 Subject: File open, read and store in Hash, efficient? Hello, I am writing a class and I require it to open a file, and store the contents in key, value pairs. This is my first def initialize() @@store = Hash.new end def read_file if File.exists?("LocationCopy.csv") f = File.open("LocationCopy.csv","r") f.each do |line| temp = line.split(",") @@store[temp[0]] = temp[1] end f.close end #puts @@store end