From: Seebs Date: 2009-11-18T09:35:24+09:00 Subject: Re: help with parsing On 2009-11-18, Mayur Shivakumar wrote: > 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. It would depend on what was delimited by the tabs. You might try: x = File.read("data.text") x.sub!(%r{.*\n}, '#') This reads the contents of the file into a string, and turns it into a hash (#). -s -- Copyright 2009, all wrongs reversed. Peter Seebach / usenet-nospam@seebs.net http://www.seebs.net/log/ <-- lawsuits, religion, and funny pictures http://en.wikipedia.org/wiki/Fair_Game_(Scientology) <-- get educated!