From: James Gray Date: 2007-12-29T11:12:19+09:00 Subject: Re: How to jump over the first line in a file? (newbie) On Dec 28, 2007, at 1:59 PM, Mark Toth wrote: > Thomas Wieczorek wrote: >> On Dec 28, 2007 8:12 PM, Mark Toth wrote: >>> Stefano Crocco wrote: >>> Hmmm, it sounds like a great idea! Can you please send me some >>> code for >>> it? >>> >> >> Just add a sFile.gets before the while. > > Okeeeey, so you mean like this?: No. To jump over a line do: #!/usr/bin/env ruby -wKU File.open(__FILE__) do |file| # open this code file file.gets # read and skip one line file.each do |line| puts line # replace this with the needed code end end __END__ James Edward Gray II