in reply to split $data, $unquoted_value;

The fact that you have in your test data an apostrophe that does not delimit a quotation makes things harder (the apostrophe in not if it's quoted). I don't think there's a way to do the Right Thing that kind of fuzzy data, but according to your written specification, here's a way to do it.

The trick is to think like a lexer. A quotation should be treated as one atomic entity, just like a character. Now the components that make up a sentence are entire quotations and individual non-period characters. Breaking it down this way, it's straightforward to see:

my $data = qq[ this is some text. A period (".") usually terminates a statement. But not if it is quoted. Regardless of whether or not single quotes, '.', are used. And yes, "Mr. Ovid," even lines with a period in the middle of a quo +te. ]; my $doublequoted = qr/"[^"\\]*(?:\\.[^"\\]*)*"/m; my $singlequoted = qr/'[^'\\]*(?:\\.[^'\\]*)*'/m; my $sentence = qr/ (?: $singlequoted | $doublequoted | [^.] )* \. +/xm; my @items = $data =~ /($sentence)/g; print "[$_]\n" for @items;
(delimited quote regexes stolen shamelessly from Abigail-II's Re: regex regexen) The only thing is to be careful that a quotation match is attempted first in the $sentence definition.

This solution does not require the period(s) inside a quotation to be at the end of the quotation, which is a problem I think some of the other solutions suffer from.

Update: to allow for non-terminator "." characters inside floating point numbers (as per Re^2: split $data, $unquoted_value;), here is a rough addition:

my $float = qr/\d+\.\d+/; my $sentence = qr/ (?: $float | $singlequoted | $doublequoted | [^ +.] )+ \. /xm; $data .= "g = 9.8 m/s.";
You can add other exceptions similarly...

blokhead