#!/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"; } }