my $string = 'this is a string of text'; $string =~ s/\b(\w+)\b/ucfirst($1)/ge; print "$string\n";
Standard input is empty
===SORRY!=== Unsupported use of =~ to do pattern matching; in Perl 6 please use ~~ at line 2, near " s/\\b(\\w+)"
Standard output is empty