Hello,

After a long absence (been busy) I'm trying to re-learn Perl 6. I'm
reading the book "Using Perl 6", from Jonathan S, Moritz, Mäsak, PM
and Jonathan W.:

http://github.com/downloads/perl6/book/2010.08.a4.pdf


I tested the first program using the latest release of Rakudo Star.
The first program has the following:

my @sorted = @names.sort({ %sets{$_} }).sort({ %matches{$_} }).reverse;


This works correctly, but it's long and I'd rather format this line like this:

This works correctly, but I was surprised that this doesn't:

my @sorted = @names.sort({ %sets{$_} })
                   .sort({ %matches{$_} })
                   .reverse;


I was surprised when this didn't work. Does anyone know if this is a
bug in Rakudo, or if Perl 6 is really not supposed to have methods
separated by white space like this? The message from Rakudo was not
very informative. It just says "Confused at line 28, near my @sorted".

Cheers,
Daniel.
-- 
No trees were destroyed in the generation of this email, but a large
number of electrons were severely inconvenienced.

Reply via email to