in reply to Regex to do a smart split()

Text::ParseWords will handle this for simple cases.
#!/usr/bin/perl use strict; use warnings; use Text::ParseWords; my $str = qq/ "first item", "comma inside, item", a, b, c, 'last item' + /; my @a = parse_line(',', 0, $str); print "$_\n" for @a;