in reply to regex for text manipulation

What have you tried so far? Do you know about the built-in functions ucfirst and lc ? You might also find the \L regex operator useful:
my @words = qw/mY WoRd THIS is A mEsS/; for ( @words ) { (my $downcased = $_) =~ s/(\w+)/\L$1/; print join( " ", $_, $downcased, ucfirst(lc), uc ), "\n"; } __OUTPUT__ mY my My MY WoRd word Word WORD THIS this This THIS is is Is IS A a A A mEsS mess Mess MESS