aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAbigail <abigail@abigail.freedom.nl>2021-12-05 19:50:01 +0100
committerAbigail <abigail@abigail.freedom.nl>2021-12-05 19:50:01 +0100
commit572ff4cc7005cc895c3a4544d6bb915359388b40 (patch)
tree4430ef0625e7f53d7f25a19c12ef27a91eb0c9a0
parent44bcd3ae0c35b887bd579e60c17198360f3497c3 (diff)
downloadperlweeklychallenge-club-572ff4cc7005cc895c3a4544d6bb915359388b40.tar.gz
perlweeklychallenge-club-572ff4cc7005cc895c3a4544d6bb915359388b40.tar.bz2
perlweeklychallenge-club-572ff4cc7005cc895c3a4544d6bb915359388b40.zip
Use same variable name as other solutions
-rw-r--r--challenge-141/abigail/perl/ch-2.pl8
1 files changed, 4 insertions, 4 deletions
diff --git a/challenge-141/abigail/perl/ch-2.pl b/challenge-141/abigail/perl/ch-2.pl
index 3417e54e1d..a8f61aab79 100644
--- a/challenge-141/abigail/perl/ch-2.pl
+++ b/challenge-141/abigail/perl/ch-2.pl
@@ -65,10 +65,10 @@ sub substrings ($n, $m, $prefix = -1, $max = $n) {
# Recurse, once by picking up the first character of $n, and
# once by skipping the first character.
#
- my $fc = substr ($n, 0, 1);
- my $next = 10 * ($prefix == -1 ? 0 : $prefix) + $fc;
- substrings (substr ($n, 1), $m, $next, $max) +
- substrings (substr ($n, 1), $m, $prefix, $max);
+ my $fc = substr ($n, 0, 1);
+ my $n_prefix = 10 * ($prefix == -1 ? 0 : $prefix) + $fc;
+ substrings (substr ($n, 1), $m, $n_prefix, $max) +
+ substrings (substr ($n, 1), $m, $prefix, $max);
}