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