"Pe?a, Botp" wrote:

> File.open("test") do |f|
>     while (f.lineno <= 4)
>           f.readline
>     end
>     f.each do |line|
> p line
>     end
> end

 File.open("test") do |f|
     f.readlines.slice(5..-1) do |line|
        p line
     end
 end

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.

-- 
  Phlip
   http://www.greencheese.org/EvolutionaryPsychology
  --  Who needs a degree when we have Web e-search engines?  --