local $x = 10; sub f { print $x."\n"; } sub g { local $x = 20; return f(); } g();