my @headings = split /(?<=")\s*,\s*(?=")/, $line;
But that makes no attempt at tokenizing and parsing the line for balanced quotes, escaped quotes in a field, or quoted commas. If you need to deal with those issues, you've got more work ahead of you, the complexity of which is why people tend to recommend and use Text::CSV.
Dave
In reply to Re: Match a comma between two words
by davido
in thread Match a comma between two words
by Stefany
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |