http://qs321.pair.com?node_id=11118253

toothedsword has asked for the wisdom of the Perl Monks concerning the following question:

can regex contains function? I want convert the first character of words upcase. The code below does not work.

#!/usr/bin/env perl my $t = ' aa bb cc'; $t =~ s/(\s)(\w)/${1}uc($2)/g; print($t);