Re: split and one liner problem

2017-08-04 Thread ToddAndMargo
On 08/04/2017 12:07 PM, Brandon Allbery wrote: Sorry, I forgot the block thing (it reads the following block as a parameter). ``` lines() ``` would also have worked. I really appreciate the help. And it was a good exercise in troubleshooting!

Re: split and one liner problem

2017-08-04 Thread Brandon Allbery
Sorry, I forgot the block thing (it reads the following block as a parameter). ``` lines() ``` would also have worked. On Friday, August 4, 2017, ToddAndMargo wrote: > > > On Friday, August 4, 2017, ToddAndMargo > > wrote: > > > > Hi All, > > > > > > What a

Re: split and one liner problem

2017-08-04 Thread ToddAndMargo
> On Friday, August 4, 2017, ToddAndMargo > wrote: > > Hi All, > > > What am I doing wrong here? > > $ echo -e "abc\ndef\nghi" | perl6 -e 'for ( split "\n", lines ) { > say "<$_>"; }' > > > > > I am trying to get > > > > On

Re: split and one liner problem

2017-08-04 Thread Brandon Allbery
That's a weird thing to do. You call a function that returns the lines of input as a list, in a context that joins them back together as words, and then try to split the result on lines again. lines already gives you what you want. Don't split. perl6 -e 'for lines { say "<$_>"; }' On Friday, Aug

split and one liner problem

2017-08-04 Thread ToddAndMargo
Hi All, What am I doing wrong here? $ echo -e "abc\ndef\nghi" | perl6 -e 'for ( split "\n", lines ) { say "<$_>"; }' I am trying to get