$str = "today is wednesday.tomorrow IS THURSDAY."; print "$str\n"; $str =~ s/(.*)/\L$1/gis; $str =~ s/\.(\w)/\.\u$1/gis; $str =~ s/\A(\w)/\u$1/gis; print "\n$str\n";