diff options
| -rwxr-xr-x | challenge-256/mattneleigh/perl/ch-2.pl | 6 |
1 files 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 |
