Slide 7 of 29
Notes:
Just about every line directly related to the task.
Not the best code in the world but it gets the job done.
(The split could be replaced with two lines of code to do the right thing
with quoted fields and embedded commas, for example.)