From: James Edward Gray II Date: 2006-12-07T23:25:28+09:00 Subject: Re: #help in reading from csv file On Dec 6, 2006, at 11:58 PM, Tanushree Bhoi wrote: > # iterate to the csv file row by row till there is any row exists. > > while(row=product.shift) > create_product(row) create_product(row) unless row.empty? > end > Here in this code it is reading one extra empty row from the file > how to > handle that in ruby. > I want to control the loop where there is no more rows in the csv > file. > Can anybody helps.Help will be highly appreciated. I suspect there is an empty line in your file. If so, the above fix should help. James Edward Gray II