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);
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: can regex contains function?
by choroba (Cardinal) on Jun 19, 2020 at 07:49 UTC | |
Re: can regex contains function?
by soonix (Canon) on Jun 19, 2020 at 07:29 UTC | |
by toothedsword (Sexton) on Jun 19, 2020 at 07:44 UTC | |
by Anonymous Monk on Jun 19, 2020 at 12:46 UTC | |
by toothedsword (Sexton) on Jun 20, 2020 at 03:08 UTC |
Back to
Seekers of Perl Wisdom