in reply to Refactoring Perl #6 - Split Temporary Variable
Regarding your for $i "possible exception" example:
If one thinks the variable can be used after the loop, containing something sensible set inside the loop, you will be bitten by perl which will arrange to have made your variable "implicitly local to the loop and regains its former value upon exiting the loop." (c/f perldoc perlsyn)
In Section
Meditations