diff options
| -rw-r--r-- | challenge-209/polettix/perl/ch-2.pl | 4 |
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->@*; } |
