$s = 'a,b,"hey, you","str1, str2, str3",end';; print for split ',(?=\S)', $s;; a b "hey, you" "str1, str2, str3" end