HiDestinationID^Name^City^StateProvince^Country^Latitude^Longitude^Type
{B75F49C9-7B62-44E7-92FE-0A7F0CCEDF14}^ Sardinia de Galdar Beach^Gran
Canary^ES^28.151890^-15.696225^2

{F920BB01-7E65-4E7F-B312-826A299CB154}^10 Yul
Park^Ashkhabad,Ashgabat^TKM^37.927452^58.374588^2
-------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------

So that my code is


dataArray= Array.new
n = 0
File.new("data.csv").each_line do |line|
 line.chomp!
 dataArray[n] = line.split(',')
 n += 1
end

i=0
while(i < dataArray.length)


 puts "First: #{dataArray[i][0]}"


 i=i+1

end


But this code wotks to display all the fields

My requirement is  i have to put .csv file into elements of array so that i
can increment longitude and latitude values for compraion if it matches

then i have to pull the entire row from the file this is the problem am
facing


Regards
prash...

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to