go ahead... be a heretic | |
PerlMonks |
Re^3: printing every 2nd entry in a list backwardsby tobyink (Canon) |
on May 19, 2017 at 16:56 UTC ( [id://1190652]=note: print w/replies, xml ) | Need Help?? |
Well, it necessitates using a block, and the block form of grep is a little slower than the expression form.
But it's not just that. Even if you make them both use the block form of grep, state comes out behind my. I guess they've just put a lot of work into optimizing how fast normal lexical variables work, and less work into state variables.
In Section
Seekers of Perl Wisdom
|
|