From: Stefano Crocco Date: 2011-11-13T07:49:28+09:00 Subject: Re: Syntax Error On Sunday 13 November 2011 07:44:16 Darren H. wrote: > Since I remove the do line, how do I get the output of price which is > located in the CSV file under price by just having a user enter the > product_id? You don't need to remove the line with the do, just the do keyword: puts "enter Product ID Number" product_id = gets.chomp CSV.foreach("c:\plantproducts.csv") do |row| if product_id == row[0] (price * qty) #The do is gone end end puts "Enter Qty)" qty = gets.chomp You won't be able to do anything with the result of price*qty, however, unless you store it in a variable. Stefano