use warnings; use strict; my $str = do {local $/ = ''; ;}; print join "^", split /(?## this is some text^ A period (".") usually terminates a statement^ But not if it's quoted^ Regardless of whether or not single quotes, '.', are used^ "Quoted sentences with a ^ in the middle." could be harder to manage however