From 395b28bb892e96abc8d8fd41e312ad1ddd977c07 Mon Sep 17 00:00:00 2001 From: robbie-hatley Date: Thu, 17 Jul 2025 19:28:28 -0700 Subject: Now using "ucfirst" to Title-Case first characters. --- challenge-330/robbie-hatley/perl/ch-2.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/challenge-330/robbie-hatley/perl/ch-2.pl b/challenge-330/robbie-hatley/perl/ch-2.pl index 8c5428f9f0..e551ab01c0 100755 --- a/challenge-330/robbie-hatley/perl/ch-2.pl +++ b/challenge-330/robbie-hatley/perl/ch-2.pl @@ -59,7 +59,7 @@ Output is to STDOUT and will be each input followed by the corresponding output. my $n = scalar(@words); for ( my $idx = 0 ; $idx < $n ; ++$idx ) { if ( 0 == $idx || $n-1 == $idx || length($words[$idx]) >= 3 ) { - $words[$idx] =~ s/^(.)(.*)$/uc($1).lc($2)/e} + $words[$idx] =~ s/^(.)(.*)$/ucfirst($1).lc($2)/e} else { $words[$idx] = lc $words[$idx]}} return join ' ', @words} -- cgit