We should emphasize for pragovnj's sake that using my in for loops to localize the loop variable is extremely highly recommended. Failing code as shown by you is almost always a logic error as well as a syntax error because the loop variable is aliased to each of the loop values and any variable of the same name outside the loop is not affected by the machinations of the loop!
In particular a Perl for loop variable is not like a C for loop variable (where the loop variable retains its last value).
Optimising for fewest key strokes only makes sense transmitting to Pluto or beyond