From: naPOLeon Date: 2006-10-27T22:45:19+09:00 Subject: Re: reading variables in a file I would do this that way: var = Array.new File.open("file.txt", "r") do |file| file.each_line do |line| var << line.split end end Now you have an array to play with. If you want to access a specific line, use sth = var[0] => ["Peter", "4", 1990"] Or a single variable: var[0][0] => "Peter" var[2][2] => "1991" If you want to write them into an other file, just write: File.open("write.txt", "a+") do |file| file << var end Hope thats, what you were looking for, naPOLeon