02.09.2015, 14:49, "Elizabeth Mattijsen" :
>> I think this is covered somewhere in RFC; perl6 repeatedly overwrites
>> END{} block where last one references last %d definition (say %d.WHICH).
>> perl5 on the other hand stays with first END{} block (say \%d).
>
> A much
On Wed, Sep 2, 2015 at 7:49 AM, Matija Papec wrote:
>
> I've picked a wrong example,
>
> seq 3 | perl -nE 'my %d; $d{$_}++; END { say keys %d }'
>
> vs
>
> seq 3 | perl6 -ne 'my %d; %d{$_}++; END { say keys %d }'
>
> So it seems that perl6 handles lexicals inside while
On Tue, Sep 1, 2015 at 3:10 AM, Matija Papec wrote:
> Not pretty, also you'll have to take care of -a switch,
S19 calls for -a and -F, surprised Rakudo doesn't have'em! Though from
later examples, the ".words" method is a fine substitute.
On Tue, Sep 1, 2015 at 11:03
On Wed, Sep 2, 2015 at 12:27 PM, yary wrote:
> Do perl6's Bag type and feed operators, or other features, open up a cleaner
> way?
scan +spam|perl6 -e ".say for lines.map({.words(2)[1]}).Bag.sort"
-y
> On 02 Sep 2015, at 14:02, Matija Papec wrote:
> 02.09.2015, 10:46, "The Sidhekin" :
>>> So it seems that perl6 handles lexicals inside while (<>){} one-liners
>>> differently.
>>
>>Ah, yes. Interesting. Run-time effect of C not happening
>>
02.09.2015, 10:46, "The Sidhekin" :
>> So it seems that perl6 handles lexicals inside while (<>){} one-liners
>> differently.
>
> Ah, yes. Interesting. Run-time effect of C not happening repeatedly.
> How would that deparse?
Good question, I wouldn't be surprised
On Tue, Sep 1, 2015 at 5:41 PM, Matija Papec wrote:
> Scoping of lexical looks interesting
>
> perl6 -ne 'my %d; %d{ .words[1] }++; END { %d.sort.perl.say }'
>
> as this could not work in perl5
>
> perl -nE 'my $d =1; END { say $d//"default!" }' # gives default
>
It's