in reply to Match non-capitalized words at the beginning of each sentence

I see three cases to deal with:
  1. The first sentence, which has no preceding punctuation-whitespace.
  2. A "regular" sentence that has the punctuation-whitespace-word sequence.
  3. A regular sentence that happens to start on a new line.
Assuming the file is not so huge that we can't slurp it in I'd take the easy way out of number three and undef the input record separator (undef $/;). The first two could be handled separately
#!/usr/bin/perl -w use strict; @ARGV = '/Perl/LearningPerl/Test'; local $/ = ''; for(<>) { if(/^([a-z]+)/) { print "\'$1\' is not capitalized\n"; } while(/[:.?!]\s+([a-z]\w*)/g){ print "\'$1\' is not capitalized\n"; } }