aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMohammad S Anwar <Mohammad.Anwar@yahoo.com>2023-04-02 23:59:24 +0100
committerGitHub <noreply@github.com>2023-04-02 23:59:24 +0100
commit8b1a6acdb444383333f8d9ea2010db0eb6435d70 (patch)
tree4be8a0ffe022643b734e9b23deb8dc83a5ef6ac6
parentf71237e9c7d2bfd11848989cbc5e8d9a904b342d (diff)
parent39f196f77e492f8bfafcf1b5c23eea2c28040de7 (diff)
downloadperlweeklychallenge-club-8b1a6acdb444383333f8d9ea2010db0eb6435d70.tar.gz
perlweeklychallenge-club-8b1a6acdb444383333f8d9ea2010db0eb6435d70.tar.bz2
perlweeklychallenge-club-8b1a6acdb444383333f8d9ea2010db0eb6435d70.zip
Merge pull request #7815 from polettix/polettix/pwc209-1
Remove bug noted by github/oldtechaa
-rw-r--r--challenge-209/polettix/perl/ch-2.pl4
1 files changed, 2 insertions, 2 deletions
diff --git a/challenge-209/polettix/perl/ch-2.pl b/challenge-209/polettix/perl/ch-2.pl
index b6c7fe78e4..8ed759586b 100644
--- a/challenge-209/polettix/perl/ch-2.pl
+++ b/challenge-209/polettix/perl/ch-2.pl
@@ -68,8 +68,8 @@ sub merge_accounts ($aref) {
if (defined($last_wiped)) {
my $marker = my $cursor = $last_wiped;
while (++$cursor < $all_groups->$#*) {
- next if defined($all_groups->[$cursor]);
- $all_groups->[$marker++] = $all_groups->[$cursor];
+ $all_groups->[$marker++] = $all_groups->[$cursor]
+ if defined($all_groups->[$cursor]);
}
splice $all_groups->@*, $marker if $marker < $all_groups->@*;
}