On Wed, May 16, 2012 12:25 pm, damien krotkine wrote: > On 16 May 2012 14:02, Peter Makholm <pe...@makholm.net> wrote: > [ ... ] > >> So basically you are trading 8 characters for readability and probably >> speed. Why do you want that? > > For fun, purely. I'll stick with $f % 2 for now, it seems a right > balance compared to the code lying around.
If, as it sounds, you want to balance golfiness and strictness, you could also say: @array[grep $_%2, keys @array] (or @array[grep $_%2^1, keys @array] if you set $[ to 1 - but you didn't do that, right? :-) )