15 months ago I wrote a blog post about Building a Huffman Tree with Perl 6 (German). Back then I used pugs to test it.

Now I tried it with Rakudo Perl revision 29736, and to my delight I discovered that it worked nearly without modification.

(Actually it needed a small modification because I made a mistake in the testing originally, I compared hashes with string semantics. That works in pugs even though it is not specified; in rakudo it doesn't).

I updated my script a bit to do the testing correctly, and used a few more typical Perl 6 idioms: