Hi,

2008/6/6 Michael Litchard <michael / schmong.org>:
> Hi, I'm taking this flat file and putting it into a mysql table.
> The question is, given the code I will be working from, what's the Ruby way
> to skip the first line?
>
>
>
> Here's the code I'll be working from
>
> # prepare statement for use within insert loop
>   sth = dbh.prepare("INSERT INTO people (id, name, height) VALUES(?, ?, ?)")
>
>   # read each line from file, split into values, and insert into database
>   File.open("people.txt", "r") do |f|
>     f.each_line do |line|

         next if f.lineno==1

>       name, height = line.chomp.split("\t")
>       sth.execute(nil, name, height)
>     end
>   end
>

Regards,

Park Heesob