in reply to for, foreach: any difference?

MUBA,
Ok - yes and no - depends on how you look at it. One is usually referred to as a C-style for loop (does not localize $_ or implicitly alias looping variable) and the other is typically referred to as a foreach loop (which does both of those things).
for ( $i = 0; $i < 10; $i++ ) { # C-style but could also say foreach } foreach ( @array ) { # Localizes $_ and implicitly aliases looping variable # Could also just be for }
In your code, it does not matter which name you use. It is the looping construct that follows the name that determines the internal behavior.

Cheers - L~R