* hu8 <jakobfastenbauer196 / hotmail.com> [2005-01-30]: ^^^ You should post with a real name here. > How can I read data from a file? How to separate it, is my > second question. begin file = File.open('filename') while not file.eof? values = file.gets.split(/,/) # do some stuff with it end ensure file.close end With this code, you have an array "values" within the while-loop. "values" contains all the fields which were seperated by comma in the file. Julius