<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Ruby: Ignore header line when parsing CSV file</title>
	<atom:link href="http://www.markhneedham.com/blog/2008/10/04/ruby-ignore-header-line-when-parsing-csv-file/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.markhneedham.com/blog/2008/10/04/ruby-ignore-header-line-when-parsing-csv-file/</link>
	<description>Thoughts on Software Development</description>
	<lastBuildDate>Sat, 31 Jul 2010 12:46:58 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: Bobby Washington</title>
		<link>http://www.markhneedham.com/blog/2008/10/04/ruby-ignore-header-line-when-parsing-csv-file/comment-page-1/#comment-16690</link>
		<dc:creator>Bobby Washington</dc:creator>
		<pubDate>Mon, 11 May 2009 16:16:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.markhneedham.com/blog/?p=430#comment-16690</guid>
		<description>Thank you for the explanation Mark.

Thanks,
Bobby</description>
		<content:encoded><![CDATA[<p>Thank you for the explanation Mark.</p>
<p>Thanks,<br />
Bobby</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark Needham</title>
		<link>http://www.markhneedham.com/blog/2008/10/04/ruby-ignore-header-line-when-parsing-csv-file/comment-page-1/#comment-16480</link>
		<dc:creator>Mark Needham</dc:creator>
		<pubDate>Sat, 09 May 2009 02:34:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.markhneedham.com/blog/?p=430#comment-16480</guid>
		<description>@Bobby - I&#039;m not sure exactly what the internals of the &#039;each&#039; method are - but basically row is defining a variable which refers to each line in the file.

The &#039;each&#039; method makes a call to the block which &#039;row&#039; is defined inside after each line of the file that it reads. So we&#039;re never ourselves putting anything into row but the each function is.</description>
		<content:encoded><![CDATA[<p>@Bobby &#8211; I'm not sure exactly what the internals of the 'each' method are &#8211; but basically row is defining a variable which refers to each line in the file.</p>
<p>The 'each' method makes a call to the block which 'row' is defined inside after each line of the file that it reads. So we're never ourselves putting anything into row but the each function is.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bobby Washington</title>
		<link>http://www.markhneedham.com/blog/2008/10/04/ruby-ignore-header-line-when-parsing-csv-file/comment-page-1/#comment-16453</link>
		<dc:creator>Bobby Washington</dc:creator>
		<pubDate>Fri, 08 May 2009 18:01:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.markhneedham.com/blog/?p=430#comment-16453</guid>
		<description>First off let me thank you for this blog.  It has been very beneficial to me.  I&#039;m attempting to build an key-word driven automation framework with Ruby/Watir and I needed to learn how to parse a csv file.  I&#039;m still a n00b with Ruby.  I understand this blog however the question I have is about the 
&quot;row[0]&quot;.    Can you explain what this is for.  I looks like you are pushing contents of row[0] into the name variable.  However I don&#039;t see anthing being read into row[].

Thanks,
Bobby</description>
		<content:encoded><![CDATA[<p>First off let me thank you for this blog.  It has been very beneficial to me.  I'm attempting to build an key-word driven automation framework with Ruby/Watir and I needed to learn how to parse a csv file.  I'm still a n00b with Ruby.  I understand this blog however the question I have is about the<br />
"row[0]".    Can you explain what this is for.  I looks like you are pushing contents of row[0] into the name variable.  However I don't see anthing being read into row[].</p>
<p>Thanks,<br />
Bobby</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Luigi Montanez</title>
		<link>http://www.markhneedham.com/blog/2008/10/04/ruby-ignore-header-line-when-parsing-csv-file/comment-page-1/#comment-586</link>
		<dc:creator>Luigi Montanez</dc:creator>
		<pubDate>Sat, 04 Oct 2008 04:29:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.markhneedham.com/blog/?p=430#comment-586</guid>
		<description>I wholeheartedly recommend FasterCSV:

http://fastercsv.rubyforge.org/

Comes with a headers option:

&lt;code&gt;
FasterCSV.foreach(&quot;/path/to/file.csv&#039;, :headers =&gt; true) do &#124;row&#124;&lt;/code&gt;

So the headers row will be skipped in the iteration, but you also get some nice convenience methods to work with it if you so wish.</description>
		<content:encoded><![CDATA[<p>I wholeheartedly recommend FasterCSV:</p>
<p><a href="http://fastercsv.rubyforge.org/" rel="nofollow">http://fastercsv.rubyforge.org/</a></p>
<p>Comes with a headers option:</p>
<p><code><br />
FasterCSV.foreach("/path/to/file.csv', :headers =&gt; true) do |row|</code></p>
<p>So the headers row will be skipped in the iteration, but you also get some nice convenience methods to work with it if you so wish.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
