in reply to Placement of "my"

Outside the loop implies you want to retain the value from the last iteration of the loop.

Inside the loop implies that the information is only applicable inside the loop.

Program for clarity of intent rather than trying to prematurely optimize (or pessimize) your code.


True laziness is hard work