From: Martin DeMello Date: 2005-08-02T18:11:04+09:00 Subject: Re: csv to hash ou_ryperd wrote: > Hi > I have a csv file with two fields per line. What would the most > effective way be to read it into a hash variable ? e.g.: > 10000,A > 10001,B > 10002,C hash = [] IO.foreach('file') {|line| k,v = line.split(/,/) hash[k] = v } martin