From 0880f9cd033313758d07e32937e6a9cf59fc3fe7 Mon Sep 17 00:00:00 2001 From: Stephen Lynn Date: Sat, 26 Nov 2022 20:34:14 +0800 Subject: more fix ch-2.pl --- challenge-192/steve-g-lynn/perl/ch-2.pl | 3 +-- 1 file changed, 1 insertion(+), 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; } }; -- cgit