Re: Raku version of "The top 10 tricks of Perl one-liners" ?!?

2020-07-22 Thread William Michels via perl6-users
Dear Larry, Thank you so much for such a complete reply! Not to keep score here, it seems like 9/10 Perl5 'one-liner tricks' are baked into Raku from the language's inception. [ The only feature that might be missing is 'Trick #3' where Perl5 modifies a file in-place at the bash command line

Re: Raku version of "The top 10 tricks of Perl one-liners" ?!?

2020-07-22 Thread Timo Paulssen
Try it with a very filled folder, though. I would expect the majority of the time spent is setup and actually going through the lines themselves isn't very slow. On 22/07/2020 22:31, Aureliano Guedes wrote: > That is a little bit disappointing: > > $ time ls -l | perl -lane 'print "$F[7] $F[1]"'

Re: Raku version of "The top 10 tricks of Perl one-liners" ?!?

2020-07-22 Thread Elizabeth Mattijsen
Larry, good to see you here! Of course, I have some comments on your suggestions :-) > On 22 Jul 2020, at 21:14, Larry Wall wrote: >> Trick #5: -a >> >> -a turns on autosplit mode – perl will automatically split input >> lines on whitespace into the @F array. If you ever run

Re: Raku version of "The top 10 tricks of Perl one-liners" ?!?

2020-07-22 Thread Aureliano Guedes
That is a little bit disappointing: $ time ls -l | perl -lane 'print "$F[7] $F[1]"' > /dev/null real 0m0.008s user 0m0.013s sys 0m0.000s $ time ls -l | raku -ne 'say "$_[7] $_[1]" given .words' > /dev/null Use of Nil in string context in block at -e line 1 real 0m0.302s user 0m0.370s sys

Re: Raku version of "The top 10 tricks of Perl one-liners" ?!?

2020-07-22 Thread Larry Wall
On Sun, Jul 19, 2020 at 09:38:31PM -0700, William Michels via perl6-users wrote: : Hello, : : I ran across this 2010 Perl(5) article on the Oracle Linux Blog: : : "The top 10 tricks of Perl one-liners" : https://blogs.oracle.com/linux/the-top-10-tricks-of-perl-one-liners-v2 : : Q1. Now that