From 10a2ec6a604cef32d7d37869b32a61eba46cf60d Mon Sep 17 00:00:00 2001 From: Matthew Neleigh Date: Mon, 12 Feb 2024 17:25:54 -0500 Subject: modified: challenge-256/mattneleigh/perl/ch-2.pl --- challenge-256/mattneleigh/perl/ch-2.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/challenge-256/mattneleigh/perl/ch-2.pl b/challenge-256/mattneleigh/perl/ch-2.pl index 7769fe0fe7..8e275c5719 100755 --- a/challenge-256/mattneleigh/perl/ch-2.pl +++ b/challenge-256/mattneleigh/perl/ch-2.pl @@ -53,11 +53,11 @@ sub merge_from_alternate_strings{ # Over the length the strings have in common, # concatenate a pair of characters from each - for my $p (0 .. $minimum_common_length - 1){ + for my $pos (0 .. $minimum_common_length - 1){ $merged .= - substr($ARG[0], $p, 1) + substr($ARG[0], $pos, 1) . - substr($ARG[1], $p, 1); + substr($ARG[1], $pos, 1); } # At least one string has been used up; if one -- cgit