You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Cannot use Bool as Matcher with '.grep'. Did you mean to use $_ inside a block?
in block <unit> at <tmp> line 1
why is this? why doesn't this dwim?
Followed by:
<geekosaur> I thought this was a listed/known trap
Yet I don't see it listed on the traps page. We have a similar item there… similar but completely different. That being said, the trick that is mentioned there still applies:
my@a= <1 2 3>; say@a.grep( 2~~*.Int );
(2)
However, more common solution to this is to use a block instead:
my@a= <1 2 3>; say@a.grep( {.Int~~2} );
(2)
The text was updated successfully, but these errors were encountered:
A question on #perl6 channel was asked today:
Followed by:
Yet I don't see it listed on the traps page. We have a similar item there… similar but completely different. That being said, the trick that is mentioned there still applies:
However, more common solution to this is to use a block instead:
The text was updated successfully, but these errors were encountered: