![]() |
|
Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re: printing every 2nd entry in a list backwardsby KurtZ (Pilgrim) |
on May 19, 2017 at 12:38 UTC ( #1190605=note: print w/replies, xml ) | Need Help?? |
Print is slow, you can try to speed up your solution by taking it out of the loop
Also a common trick for a flip flop boolean state is inversion with xor $i^=1 In hindsight you want grep not a map
updated $,=" " , haukex++
In Section
Seekers of Perl Wisdom
|
|