aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xchallenge-194/perlboy1967/perl/ch-2.pl3
1 files changed, 1 insertions, 2 deletions
diff --git a/challenge-194/perlboy1967/perl/ch-2.pl b/challenge-194/perlboy1967/perl/ch-2.pl
index 41ae391e34..d15d3ceaf1 100755
--- a/challenge-194/perlboy1967/perl/ch-2.pl
+++ b/challenge-194/perlboy1967/perl/ch-2.pl
@@ -26,8 +26,7 @@ use Test::More;
sub freqEqual ($) {
- my %f = frequency(split//,$_[0]);
- my ($min,$max) = minmax(keys {reverse %f});
+ my ($min,$max) = minmax(keys{reverse frequency(split//,$_[0])});
return $min == $max-1 ? 1 : 0;
}