in reply to for, foreach: any difference?
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.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 }
Cheers - L~R
|
---|