$i = 3; for (my $i = 0; $i < 30; $i++) { # \ # do something here # | scope of inner $i variable } # / print $i, "\n"; # prints 3 because it's the outer variable again