If all your data is like you showed (commas only as field separators, not embedded in fields; newlines as record separators, not embedded in fields), then split is what you want. If you have more complex data, then look at this: Comparison of the parsing features of CSV (and xSV) modules.