diff options
| -rw-r--r-- | challenge-189/mohammad-anwar/perl/ch-1.pl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/challenge-189/mohammad-anwar/perl/ch-1.pl b/challenge-189/mohammad-anwar/perl/ch-1.pl index 7e0d7f2806..bd061f7b07 100644 --- a/challenge-189/mohammad-anwar/perl/ch-1.pl +++ b/challenge-189/mohammad-anwar/perl/ch-1.pl @@ -31,6 +31,7 @@ done_testing; # METHOD sub greater_character($t, @chars) { - for (sort @chars) { return $_ if ord > ord $t } + my $ord_t = ord $t; + for (sort @chars) { return $_ if ord > $ord_t } return $t; } |
