From: Sebastian Hungerecker Date: 2007-09-24T03:43:00+09:00 Subject: Re: Split into hash Lee Jarvis wrote: > Ok guys, I have a file which looks something like this: > > one=1 > two=2 > three=something > four=something else > > I want to read each line into a hash, key=value.. Hash[*File.read(filename).scan(/^.*=.*$/).flatten] HTH, Sebastian -- NP: Black Sabbath - Dirty Women Jabber: sepp2k@jabber.org ICQ: 205544826