title: String cant write to CSV file Ruby
body: <p>I don't necessarily understand why this bit of code is incorrect. I understand the error in that string class doesn't have a method map. But I'm having a hard time wrapping my head around this error. </p>
  
  <p>The error</p>
  
  <pre><code>`&lt;&lt;': undefined method `map' for #&lt;String:0x000001020b8940&gt; (NoMethodError)
  </code></pre>
  
  <p>The but of code</p>
  
  <pre><code>require 'nokogiri'
  require 'open-uri'
  require 'csv'
  
  doc = Nokogiri::HTML(open("dent-file.html"))
  
  new_array = doc.search("p").map do |para|
       para.text
  end
  
  CSV.open("dent.csv", "w") do |csv|
     new_array.each do |string|
       csv &lt;&lt; string
     end
  end
  </code></pre>
  
  <p>I want to write each element of the <code>newdoc</code> array to each line of the csv file dent.csv. </p>