Re: grep changes?

2015-10-14 Thread Larry Wall
I got tired of this FAQ, so I just made it work by using $_ as the loop variable in the implementation of grep, so that an accidentally returned regex still sees a $_ to make it happy. Running slower is already sufficient punishment. :) Larry

Re: grep changes?

2015-10-05 Thread Jonathan Scott Duff
The block does get the topic, but the regex isn't executing immediately. Another way to get what you want, rather than mentioning the topic explicitly, is to use the m// form of match. > grep { m/\.pl6/ }, (a.pl6) For sanity's sake, I would recommend writing your match-immediately regex like

grep changes?

2015-10-02 Thread mt1957
Hi, noticed that grep doesn't accept a Match operation anymore In repl ... > grep { /\.pl6/ }, Method 'match' not found for invocant of class 'Any' Must now do explicitly match on the topic variable > grep { $_ ~~ /\.pl6/ }, (a.pl6) Is this change correct? perl6 version

Re: grep changes?

2015-10-02 Thread Philip Hazelden
Grep still accepts a regex, so `grep /\.pl6/, ` does what you want. On Fri, Oct 2, 2015 at 5:12 PM mt1957 wrote: > Hi, > noticed that grep doesn't accept a Match operation anymore > In repl ... > > > grep { /\.pl6/ }, > Method 'match' not found for invocant of class 'Any' >

Re: grep changes?

2015-10-02 Thread mt1957
Hi Philip, Thanks for your answer. Seems that I've written it wrongly then. Doesn't the block get the topic variable in the same way like map or can't the block be used there at all? Greetings Marcel Grep still accepts a regex, so `grep /\.pl6/, ` does what you want. On Fri, Oct 2, 2015