From: Gavin Sinclair Date: 2002-11-06T08:12:39+09:00 Subject: Re: total newbie's IO troubles. From: "Camden Buzard" > I don't seem to understand the concept of IO streams. I have figured > out how to open up files, but I don't seem to be able to do much with > them. some documentation has clued me into things like each_line or > each_byte, but I still don't really understand the whole deal. > > could someone please give me a quick rundown on the basics of file > access, IO, and data flow from said files? > > --Camden Buzard In the list "Things That Ruby Newcomers Should Know" there are some helpful references, especially "Programming Ruby", that will help you here. Basically: File.open(path) do |file| file.each_line do |line| puts "> #{line}" end end Gavin