aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMohammad S Anwar <Mohammad.Anwar@yahoo.com>2022-11-26 12:47:24 +0000
committerGitHub <noreply@github.com>2022-11-26 12:47:24 +0000
commit03c344e83446eef897827cb4a6bf11f92e7d4923 (patch)
tree012c7536396fbf159df0ed216910c2df2ebc77ea
parentaa28bdcd814412b91226d2cb59b820538c03dc3c (diff)
parent0880f9cd033313758d07e32937e6a9cf59fc3fe7 (diff)
downloadperlweeklychallenge-club-03c344e83446eef897827cb4a6bf11f92e7d4923.tar.gz
perlweeklychallenge-club-03c344e83446eef897827cb4a6bf11f92e7d4923.tar.bz2
perlweeklychallenge-club-03c344e83446eef897827cb4a6bf11f92e7d4923.zip
Merge pull request #7156 from steve-g-lynn/branch-for-challenge-192
more fix ch-2.pl
-rwxr-xr-xchallenge-192/steve-g-lynn/perl/ch-2.pl3
1 files changed, 1 insertions, 2 deletions
diff --git a/challenge-192/steve-g-lynn/perl/ch-2.pl b/challenge-192/steve-g-lynn/perl/ch-2.pl
index f33219a376..a4a849585f 100755
--- a/challenge-192/steve-g-lynn/perl/ch-2.pl
+++ b/challenge-192/steve-g-lynn/perl/ch-2.pl
@@ -43,7 +43,6 @@ local *equal_distribution=sub {
};
local *is_equal = sub {
- local (@list)=@_;
(sum map {$_==$tgt} @list)==@list;
};
@@ -66,7 +65,7 @@ local *equal_distribution=sub {
local $count = 0;
while (1) {
- &is_equal(@list) && return $count;
+ &is_equal && return $count;
&iterate;
}
};