From: nobu.nokada@... Date: 2002-11-29T20:32:34+09:00 Subject: Re: loop starting not from beginning Hi, At Fri, 29 Nov 2002 20:16:30 +0900, Phlip wrote: > New question. What, if anything, is wrong with this? > > File.open("test").readlines.slice(5..-1) do |line| > p line > end > > I ask because I've experienced trouble treating the return value of open as > a file object, without the magic block mode. I'm not sure what trouble you've experienced, perhaps the file wasn't closed. IO.readlines("test").slice(5..-1) will work. And regarding original post, open("test") do |f| 4.times {f.readline} f.each {|line| p line} end -- Nobu Nakada