diff options
| author | Sol <sledmouth@gmail.com> | 2020-03-02 18:28:22 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-03-02 18:28:22 -0600 |
| commit | 6763764c011e279aef501b07e657ffe843d0af1d (patch) | |
| tree | bb9f7e06f117b0d1b083be66fb9e319e1fef77c6 /challenge-050/sol-demuth | |
| parent | 095fc5114a188a8a65a44f33ecfebc92e019fa9c (diff) | |
| download | perlweeklychallenge-club-6763764c011e279aef501b07e657ffe843d0af1d.tar.gz perlweeklychallenge-club-6763764c011e279aef501b07e657ffe843d0af1d.tar.bz2 perlweeklychallenge-club-6763764c011e279aef501b07e657ffe843d0af1d.zip | |
Sort the find, since probably lower int. ch-2.pl
Diffstat (limited to 'challenge-050/sol-demuth')
| -rwxr-xr-x | challenge-050/sol-demuth/perl/ch-2.pl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/challenge-050/sol-demuth/perl/ch-2.pl b/challenge-050/sol-demuth/perl/ch-2.pl index bb90bf7b78..9f6a496095 100755 --- a/challenge-050/sol-demuth/perl/ch-2.pl +++ b/challenge-050/sol-demuth/perl/ch-2.pl @@ -17,7 +17,7 @@ while ($len) { print '[' . join(', ', @L) . "]\n\n"; -foreach my $i (@L) { +foreach my $i (sort { $a <=> $b } @L) { if (scalar(grep {$_ > $i} @L) == $i) { print "Noble Integer: $i\n"; |
