diff options
| -rw-r--r-- | challenge-018/lubos-kolouch/perl5/ch-1.pl | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/challenge-018/lubos-kolouch/perl5/ch-1.pl b/challenge-018/lubos-kolouch/perl5/ch-1.pl index fef4d9155e..7ba1dc53d2 100644 --- a/challenge-018/lubos-kolouch/perl5/ch-1.pl +++ b/challenge-018/lubos-kolouch/perl5/ch-1.pl @@ -27,7 +27,6 @@ use feature qw{ say }; use Data::Dumper; my %all_strings; -my $max_count = 0; # ignore substrings my $seen_first; @@ -55,10 +54,7 @@ sub insert_to_all_strings { my $current_count = $all_strings{$sub_string} // 0; $current_count++; - # We have seen the substring one more time - $max_count = $current_count if $current_count > $max_count; - - # Let us remember it + # Let us store the count $all_strings{ length($sub_string) }{$sub_string}++; } |
