aboutsummaryrefslogtreecommitdiff
path: root/challenge-065
diff options
context:
space:
mode:
authorJörg Sommrey <28217714+jo-37@users.noreply.github.com>2020-06-29 08:55:09 +0200
committerJörg Sommrey <28217714+jo-37@users.noreply.github.com>2020-06-29 08:55:09 +0200
commitf11f39c41e76cf91dec380147c36c196d805be12 (patch)
treed7cd558cb541a3c3bddeed33e80872858528baae /challenge-065
parent2136a6d92e9970bf708f65c49a53ef639d6dc2c0 (diff)
downloadperlweeklychallenge-club-f11f39c41e76cf91dec380147c36c196d805be12.tar.gz
perlweeklychallenge-club-f11f39c41e76cf91dec380147c36c196d805be12.tar.bz2
perlweeklychallenge-club-f11f39c41e76cf91dec380147c36c196d805be12.zip
clarify usage of leading_zero parameter
Diffstat (limited to 'challenge-065')
-rw-r--r--challenge-065/jo-37/perl/ch-1.pl4
1 files changed, 3 insertions, 1 deletions
diff --git a/challenge-065/jo-37/perl/ch-1.pl b/challenge-065/jo-37/perl/ch-1.pl
index a2c6df1643..98be33487a 100644
--- a/challenge-065/jo-37/perl/ch-1.pl
+++ b/challenge-065/jo-37/perl/ch-1.pl
@@ -8,7 +8,9 @@ use List::Util qw(min max);
# For every possible first digit the following digits are
# retrieved by recursing into the same sub with reduced
# length and sum.
-# A leading zero is allowed when the third parameter is true.
+# A leading zero is allowed when the third parameter is true:
+# Must not be true when called at top level,
+# must be true when recursing.
sub digit_sum;
sub digit_sum {
my ($length, $sum, $leading_zero) = @_;