Re: seeking golfing advice

2012-05-17 Thread Aristotle Pagaltzis
* Mike Erickson m...@quidquam.com [2012-05-16 15:45]: If you don't care about order, but just want those elements, you can also do: keys%{{@a}} There is more than order that gets lost. If you use `keys` you also get everything back stringified – undefs are lost and references break. If you

Re: seeking golfing advice

2012-05-17 Thread Aristotle Pagaltzis
* Pau Amma paua...@gundo.com [2012-05-16 14:55]: 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? :-) ) Btw, `keys@foo` and `0..$#foo`