On Thu, Jul 29, 2010 at 7:52 PM, Jonathan Worthington
<[email protected]> wrote:
> Note that grep doesn't have to take a closure, but can also take just the
> value you're looking for...
>
>> my @x = 1,2,3; say [email protected](2); say [email protected](4);
> 1
> 0

Hm.  could have sworn I'd tried that and it didn't work.

> Though more efficient would be:
>
>> my @x = 1,2,3; say [email protected](2); say [email protected](4);
> 1
> 0

Ah, perfect.  Thanks!

> I still prefer the junction way though. :-)

I love junctions, but it feels like overkill to use them for this. :)

-- 
Mark J. Reed <[email protected]>

Reply via email to