use strict; foreach (0 .. 5) { my $foo++; } print $foo, "\n"; # throws error