Let me first recommend Text::CSV_XS or Spreadsheet::Read to you. Especially Spreadsheet::Read handles reading various tabular files, not only a limited subset of CSV files.
You don't show us what data is in $ColumnNames so it's hard to say what might go wrong in your case. If your data is delimited with commas, using split would separate them into elements in @colarray.
Maybe you can show us the relevant input and the output you get, and also tell us the output you expect so we can help you better?
In reply to Re: Reading line and Spliting it
by Corion
in thread Reading line and Spliting it
by lazy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |