#! perl -slw use strict; ( my $data = do{ local $/; } )=~ s[\n\+][]g; print "'$1'" while $data =~ m[ ( .+? ## Capture everything (minimally) (?: [.!?] \s+ ## A terminator followed by whitespace | [a-z] ## or a lowercase letter ) ) (?= [A-Z] | \z ) ## followed by a an uppercase letter or EOS ]xg; __DATA__ The Tell-Tale HeartEdgar Allen PoeTRUE! nervous, very, very dreadfully nervous I + had been and am; but why WILL you say that I am mad? The disease had sharpened + my senses, not destroyed, not dulled them. Above all was the sense of hearing + acute. I heard all things in the heaven and in the earth. I heard many things i +n hell. How then am I mad? Hearken! and observe how healthily, how calmly, I ca +n tell you the whole story.