From: Mayur Shivakumar Date: 2009-11-18T09:34:42+09:00 Subject: Re: help with parsing Jeremy Woertink wrote: > Mayur Shivakumar wrote: >> Hi , >> i am new to ruby and can anybody tell me way i can parse a tab >> delimited text file and convert it into a hash. thank you. > > You can try > > filename = "my_tab_delimeted_file.txt" > > File.readlines(filename).each do |line| > line.split("\t").each do |item| > puts item > end > end > > > ~Jeremy Thanks ...but i want to convert to hash.and text file might look like this name score result jermy 23 pass anooj 1 fail -- Posted via http://www.ruby-forum.com/.