diff options
| author | Peter Campbell Smith <88337421+pjcs00@users.noreply.github.com> | 2024-04-20 18:09:56 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-20 18:09:56 +0100 |
| commit | e50a05a38efea300de3d93d9d6d421b075e5a488 (patch) | |
| tree | c114ce8b041a177a7de4768134d7ec8b342aa1d1 | |
| parent | cdf8415b097af3c94b7e5f879f810a03628d8493 (diff) | |
| download | perlweeklychallenge-club-e50a05a38efea300de3d93d9d6d421b075e5a488.tar.gz perlweeklychallenge-club-e50a05a38efea300de3d93d9d6d421b075e5a488.tar.bz2 perlweeklychallenge-club-e50a05a38efea300de3d93d9d6d421b075e5a488.zip | |
Update ch-1.pl
Oops - typo in original version
| -rwxr-xr-x | challenge-265/peter-campbell-smith/perl/ch-1.pl | 2 |
1 files changed, 1 insertions, 1 deletions
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) . '%)'; |
