From: Nuralanur@... Date: 2006-05-26T22:10:41+09:00 Subject: Re: help regarding extracting a particular value in a file -------------------------------1148649027 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit In that case, you can use this (I follow the convention that numbering of lines and of entries starts with 0, but you can subtract 1 in the brackets, if you prefer starting at 1 in the function call): ------------------------------- class String def extract_entry(which_line,which_entry) data_array=IO.readlines(self) # reads content of file into an Array ( each entry = one line) line=data_array[which_line].split(",") return line[which_entry] end end file_name="data_to_split.txt" res=file_name.extract_entry(0,1) p 'result is' p res ---------------------------- Best regards, Axel -------------------------------1148649027--