#!C:/perl/bin -w # sentence.pl use strict; use vars qw( $sentence @sentence ); while ( ) { print "\n<$_>\n\n"; @sentence = split /\.{1,4}\s+/, $_; # push @sentences, $first; for $sentence( @sentence ) { print "\t-$sentence-\n"; } } __DATA__ This is a sentence. This is another. There were two spaces before this sentence. This is the first and only sentence of a new paragraph... but it's a long one. This sentence has commas, thusly, and, for good measure -- dashes -- thusly. End of test data.