use strict; use diagnostics; up(); up(); print get(); { my $foo; BEGIN { $foo = 1; } sub up { $foo++ } sub get { $foo } }