my $string = q|Are "Perl Monks" required to swear an "Oath of Celibacy?"|; my @broken = map { /"([^"]+)"/ ? $1 : split } split /\s?([^"]+")\s?/, $string; print "[$_] $broken[$_]\n" foreach 0 .. $#broken;