Output text with commas to a CSV

I am outputing variables of text that include commas.
EXAMPLE
YEAR = 1989
TITLE = SHAFT, THE GRAPHIC NOVEL
ISBN = 0987434231

I want these entries to be separate but not split the title into two entries. Any suggestions?

Sorry about all of the noobie questions and thanks for all of your help!

Andrew

If you're using the CSV

If you're using the CSV Writer it will wrap the values automatically.

Comma Problem

I assume the the issue arises from your need to put the information into a csv file. I can't think of any other reason why the comma would be so important to split information.

Usually what you want to do to take care of this problem is to enclose the value of the cell in double-quotes. Some spreadsheets will provide a means for escaping the character but generally they will recognize the contents inside a double-quote as belonging to one cell.

So, before you write the scraped data to the file add the double-quote characters on both sides.