This is not obfuscation, but it might be useful and didn't quite fit anywhere else...
If you want to get every other item in a list or array, and don't care if the order is preserved, you can use this:
@a = keys %{{@a}} # for even indices @a = values %{{@a}} # for odd indices
This is quite quick and powerful, but alas doesn't preserve the order.
In reply to Fetch every other item in a list by BooK
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |