RosettaCodeData/Task/I-before-E-except-after-C/Perl/i-before-e-except-after-c-2.pl
2023-07-01 13:44:08 -04:00

8 lines
190 B
Raku

while (<>) {
my @columns = split;
next if 3 < @columns;
my ($word, $freq) = @columns[0, 2];
for my $k (@keys) {
$count{$k} += $freq if -1 != index $word, $k;
}
}