From 572ff4cc7005cc895c3a4544d6bb915359388b40 Mon Sep 17 00:00:00 2001 From: Abigail Date: Sun, 5 Dec 2021 19:50:01 +0100 Subject: Use same variable name as other solutions --- challenge-141/abigail/perl/ch-2.pl | 8 ++++---- 1 file 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); } -- cgit From f1a7582acfd4891b42aee225a94e15ca40072506 Mon Sep 17 00:00:00 2001 From: Abigail Date: Sun, 5 Dec 2021 20:03:19 +0100 Subject: Link to blogs --- challenge-141/abigail/blog.txt | 1 + challenge-141/abigail/blog1.txt | 1 + 2 files changed, 2 insertions(+) create mode 100644 challenge-141/abigail/blog.txt create mode 100644 challenge-141/abigail/blog1.txt diff --git a/challenge-141/abigail/blog.txt b/challenge-141/abigail/blog.txt new file mode 100644 index 0000000000..08b309c1a2 --- /dev/null +++ b/challenge-141/abigail/blog.txt @@ -0,0 +1 @@ +https://abigail.github.io/HTML/Perl-Weekly-Challenge/week-141-1.html diff --git a/challenge-141/abigail/blog1.txt b/challenge-141/abigail/blog1.txt new file mode 100644 index 0000000000..73dacf14de --- /dev/null +++ b/challenge-141/abigail/blog1.txt @@ -0,0 +1 @@ +https://abigail.github.io/HTML/Perl-Weekly-Challenge/week-141-2.html -- cgit