$a="John is following jane"; $a=~s/(jane)/ucfirst(lc($1));/iee; print "$a\n";