The original implementation's bucketing was completely irrelevant to the goal - it still ended up counting the number of words, duplicates included.
ref: http://www.reddit.com/r/cpp/comments/369lcn/can_c_become_you...
#!/usr/bin/env perl6
sub MAIN(*@filename) {
for @filename -> $file {
my $bag = $file.IO.slurp.words.Bag;
say "$file: { [+] $bag.values } words";
CATCH { default { say "Unable to count words in $file"; } }
}
}