From: Robert Klemme Date: 2007-10-03T18:50:02+09:00 Subject: Re: Split into hash On 24.09.2007 11:11, Lee Jarvis wrote: > Thanks very much everyone, That's a great help Here's another one: h = {} File.foreach("file") do |line| h[$1]=$2 if /^([^=]*)=([^=]*)$/ =~ line end Kind regards robert