Re: What are Perl 6's killer advantages over Perl 5?
On Fri, Aug 28, 2015 at 05:48:07PM +0200, Carl Mäsak wrote: > Good news! I just pushed a change (with backing from other core > developers) that makes -e strict by default! awesome! thank you Carl! -- Marc Chantreux (eiro on github and freenode) http://eiro.github.com/ http://eiro.github.com/atom.xml "Don't believe everything you read on the Internet" -- Abraham Lincoln
Strict Rakudo version of this Perl5 one-liner
Once in a while, our sysadmin tweaks something on an upstream mail server, and asks us a few days later if our spam rate has changed. I invariably whip up a perl5 one liner like this to get a daily spam count from my "mh" mail folder: scan +spam|perl -naE '$d{$F[1]}++; END{say "$_: $d{$_}" for sort keys %d}' "scan +spam" spits out one line per message in my spam folder, with the date in field 1. I'm using perl in an awk-like way, and taking advantage of non-strictness to use a global %d without declaring it. What's a good concise "strict" Rakudo one-liner that works the same? In particular, is there a Perl6 one-liner that works line-by-line (not requiring reading all STDIN into memory) and doesn't require a variable declaration? -y
bufs and utf8
Hi, I can not do the following; my Buf $b = 'abc'.encode; Type check failed in assignment to '$b'; expected 'Buf' but got 'utf8' But I can do this; my Buf $b = 'abc'.encode ~ Buf.new(); Buf:0x<61 62 63> Does the concatenation convert utf8 into Buf? Will there be a problem when it is converted back to string with decode. I've tested a few simple utf strings which seem to decode right. Greetings Marcel
[perl #124951] Roast rakudo skip/todo test:./S04-phasers/next.t line:67 reason: 'leave NYI'
This ticket was created based on a comment in S04-phasers/next.t This test is now unfudged and passing, closing ticket. -- Will "Coke" Coleda
[perl #124997] Roast rakudo skip/todo test:./S05-capture/match-object.t line:38 reason: 'Unsupported use of $¢ variable'
This ticket was created from a todo comment in S05-capture/match-object.t This test is now unfudged and passing in glr -- Will "Coke" Coleda