Regular expression: start a string with period
$line = ".Hello!"; if ($line =~ m/^\./) { print "You shouldn't start a sentence with a period!"; }