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/, <a.pl6 b.txt>` does what you want.

On Fri, Oct 2, 2015 at 5:12 PM mt1957 <mt1...@gmail.com <mailto:mt1...@gmail.com>> wrote:

    Hi,
    noticed that grep doesn't accept a Match operation anymore
    In repl ...

     > grep { /\.pl6/ },  <a.pl6 b.txt>
    Method 'match' not found for invocant of class 'Any'

    Must now do explicitly match on the topic variable

     > grep { $_ ~~ /\.pl6/ },  <a.pl6 b.txt>
    (a.pl6)

    Is this change correct?

    perl6 version 2015.09-206-g8a195fa built on MoarVM version
    2015.09-39-g1434283

    Greets,
    Marcel


Reply via email to