#!/usr/bin/perl use strict; use warnings; use Regexp::Common qw/delimited number/; use YAML; my $x = 'Foo "ba . r". Baz. $2.67 per pound. is a "." in a sentence really a "."?'; my @x = split /($RE{delimited}{-delim=>'"'}|$RE{num}{real}|\.)/, $x; my @y = (''); for (@x) { $y[-1] .= $_; push @y, '' if $_ eq '.'; } pop @y if $y[-1] eq ''; print Dump \@y;