use strict ; use warnings ; use vars '$i' ; $i = 'hello there' ; for $i (1..2) { print "$i: $main::i\n" ; # 1: 1 } ; # 2: 2 print "$i\n" ; # hello there for my $i (4..5) { print "$i: $main::i\n" ; # 4: hello there } ; # 5: hello there print "$i\n" ; # hello there my $i = '*' ; for $i (7..8) { print "$i: $main::i\n" ; # 7: hello there } ; # 8: hello there print "$i: $main::i\n" ; # *: hello there