say { $_ } was the correct thing to use there. (I'm trying to avoid
any mention of O-O for the moment.)
say {} was a "what happens if I do this" exercise.

What is this  -> ;; $_? is raw { #`(Block|170303864) … } output?

On 9/18/16, Brent Laabs <bsla...@gmail.com> wrote:
> Remember you can call a block with parentheses:
>
>> say { 11 + 31 };
> -> ;; $_? is raw { #`(Block|140268472711224) ... }
>> say { 11 + 31 }();
> 42
>
>
> On Sun, Sep 18, 2016 at 12:58 PM, Elizabeth Mattijsen <l...@dijkmat.nl>
> wrote:
>
>> I think you want:
>>
>>   .say for reverse lines;
>>
>> not sure what you are trying to achieve otherwise, but:
>>
>>    say { }
>>
>> producing something like
>>
>>    -> ;; $_? is raw { #`(Block|170303864) … }
>>
>> feels entirely correct to me.   :-)
>>
>>
>> Liz
>>
>> > On 18 Sep 2016, at 21:52, Parrot Raiser <1parr...@gmail.com> wrote:
>> >
>> > This code:
>> > 1 #! /home/guru/bin/perl6
>> > 2
>> > 3 # Ask for some lines and output them in reverse
>> > 4 # Work out the appropriate EOF symbol for the OS
>> > 5
>> > 6 my $EOF = "CTRL-" ~ ($*DISTRO.is-win ?? "Z" !! "D");
>> > 7
>> > 8 say "Please enter some lines and end them with $EOF";
>> > 9
>> > 10 say { for reverse lines() {} };
>> > 11
>> > 12 # End
>> > produces this:
>> > Please enter some lines and end them with CTRL-D    # obviously from
>> line 8
>> > -> ;; $_? is raw { #`(Block|170303864) ... }                    # but
>> this?
>>
>>
>

Reply via email to