Reputation: 1289
below is my ruby script
require "rubygems"
require 'csv'
a = Array.new
CSV.foreach("p34n234.csv") do |row|
a << row
end
print a
What i want to do is now at the end I want to generate a html file and print array to it.
I hope i made sense.
Thanks
P.S I just want to show the array in a .html file. Nothing fancy here:)
Upvotes: 0
Views: 52
Reputation: 11274
I guess you would be doing something like this...
print "HTTP/1.0 200 OK\r\n"
print "Content-type: text/html\r\n\r\n"
print "<html><body>#{your_array}</body></html>\r\n"
Upvotes: 1