I wrote the 5.12 code first then, realising many people haven't moved past 5.8 yet, wrote the second version - I probably should have posted them in that order. Being able to confine the scope of a variable to a map (or similar) block via state in this way is a nice feature.
I agree, this solution is not directly applicable to situations like map {...} qw{...}.
-- Ken
In reply to Re^3: Variant of map for special-casing the last item
by kcott
in thread Variant of map for special-casing the last item
by jdporter
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |