aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--challenge-073/cheok-yin-fung/perl/ch-2.pl4
1 files changed, 2 insertions, 2 deletions
diff --git a/challenge-073/cheok-yin-fung/perl/ch-2.pl b/challenge-073/cheok-yin-fung/perl/ch-2.pl
index 071e9f4dea..e8b9031376 100644
--- a/challenge-073/cheok-yin-fung/perl/ch-2.pl
+++ b/challenge-073/cheok-yin-fung/perl/ch-2.pl
@@ -32,7 +32,7 @@ sub leastneigh {
push @smallkids, 0;
$youngest = $num;
}
- elsif ($num > $youngest) { # $num > $youngest
+ elsif ($num > $youngest) {
push @smallkids, $youngest;
} else { # $num == $youngest
push @smallkids, 0;
@@ -55,5 +55,5 @@ is_deeply( leastneigh([ 10, 47, 16, 50, 29, 21, 18, 20, 6, 30, 11]),
is_deeply( leastneigh([2, 3, 5, 7, 11, 13, 17]),
[0, 2, 2, 2, 2, 2, 2], "ascending sequences");
is_deeply( leastneigh([reverse (1..4)]),
- [ 0 ,0,0,0], "descending first 4 positive integers");
+ [0,0,0,0], "descending first 4 positive integers");
=cut