From: 7stud -- Date: 2011-05-05T11:15:21+09:00 Subject: Re: Creating variables on an OpenStruct with dynamic names 7stud -- wrote in post #996724: > Note that initialize() opens the file, so somewhere you will need to > close the file. Also, if you read() the entire file, then the file > pointer will be pointing to the end of the file, so if you then want to > each() the file, you will have to rewind() the file to the beginning. > On the other hand, if read() only reads one line at a time, you could call read() or each() depending on whether you wanted the next line from the file returned as an array or a row object. -- Posted via http://www.ruby-forum.com/.