$str = '(1,"(text)", 123),(2,"(string)", 234),(...)'; @arr = split(/),(/, $str); # fail @arr = split(/\),\(/, $str); # fail