use strict; my $foo = 0; for (1..5) { $foo += $_; } print $foo; #### use strict; for (1..5) { my $foo = 0; $foo += $_; } print $foo;