From: Mmcolli00 Mom Date: 2008-12-03T06:30:19+09:00 Subject: Re: How do you read text file by creating a Hash in a script? yes I meant to read it into an Hash. Can you give me a snippet? I just can't see it. file = File.open("logzT09.txt") rows = [] file.each_line do |line| rows << line.split(" ")[2] end p rows I know this is an array so it will not work. I want to be able to say...if first row's data = '00834' then set a new variable in another script of what data is availabe in that same row '00834' following that number element. I just don't know how to use a hash instead. The hash would be better since I can ,maybe, go by the data availble instead of using a column or row id. I dont'know..I'll keep at it. Thanks though. -- Posted via http://www.ruby-forum.com/.