From: Adam Boyle Date: 2007-11-02T23:19:14+09:00 Subject: Re: CSV with Ruby Newbie Zoltar Speaks wrote: > undefined method `process' for main:Object (NoMethodError) > from /usr/local/lib/ruby/1.8/csv.rb:560:in `each' > from solution.rb:4 Does the book define a "process" function? The code below would require you to define a function process that does whatever it is you need to do with the header. > reader.each{|row| process(header, row)} ex- def process( header, row ) # do something with header # do something with row end If process is a method of the CSV module, you'd need to prefix it with CSV:: to get it to work. -- Posted via http://www.ruby-forum.com/.