Subject: Re: csv to hash
From: "ou_ryperd" <walter.kruse eject.co.za>
Date: Tue, 2 Aug 2005 19:36:05 +0900
References: 150380150383
In-reply-to: 150383
Thanks Simon. No matter what I do I get nil.
txt = File::read("batches.conf")
ary = txt.scan(/^([^,\n]+),([^,\n]+))
h = {}
ary.each {|k,v| h[k] = v }
puts h[10001]
=> nil