diff options
| -rwxr-xr-x | challenge-330/robbie-hatley/perl/ch-2.pl | 2 |
1 files changed, 1 insertions, 1 deletions
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} |
