From e50a05a38efea300de3d93d9d6d421b075e5a488 Mon Sep 17 00:00:00 2001 From: Peter Campbell Smith <88337421+pjcs00@users.noreply.github.com> Date: Sat, 20 Apr 2024 18:09:56 +0100 Subject: Update ch-1.pl Oops - typo in original version --- challenge-265/peter-campbell-smith/perl/ch-1.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/challenge-265/peter-campbell-smith/perl/ch-1.pl b/challenge-265/peter-campbell-smith/perl/ch-1.pl index 034302c9fb..f35a1e32df 100755 --- a/challenge-265/peter-campbell-smith/perl/ch-1.pl +++ b/challenge-265/peter-campbell-smith/perl/ch-1.pl @@ -33,7 +33,7 @@ sub over_33perct_appearance { $times[$_] ++ for @ints; # find smallest with >33% - for ($i = 0; $i < @ints; $i ++) { + for ($i = 0; $i < @times; $i ++) { next unless defined $times[$i]; if ($times[$i] > $one_third) { say qq[Output: $i (] . int($times[$i] / @ints * 100) . '%)'; -- cgit