diff options
| -rwxr-xr-x | challenge-322/perlboy1967/perl/ch2.pl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/challenge-322/perlboy1967/perl/ch2.pl b/challenge-322/perlboy1967/perl/ch2.pl index 5c24353d26..5e46d4cf12 100755 --- a/challenge-322/perlboy1967/perl/ch2.pl +++ b/challenge-322/perlboy1967/perl/ch2.pl @@ -28,7 +28,7 @@ use List::MoreUtils qw(uniq); sub rankArray (@ints) { my ($i,%idx) = (1); - $idx{$_} = $i++ for uniq sort @ints; + $idx{$_} = $i++ for uniq sort { $a <=> $b } @ints; return map { $idx{$_} } @ints; } |
