in reply to Re: Splitting a line on just commas
in thread Splitting a line on just commas

... and to preserve the quotes using Text::ParseWords, if desired:
use strict; use warnings; use Text::ParseWords; my $line = q(a,b,"hey, you","str1, str2, str3",end); my @words = quotewords(',', 1, $line); print "$_\n" for @words; __END__ a b "hey, you" "str1, str2, str3" end