use strict; test1(); sub test1 { local $a = 1; local $aa = 2; test2(); } sub test2 { print "a = $a\n"; print "aa = $aa\n"; } # Global symbol "$aa" requires explicit package name at C:\projects\Tracing\test.pl line 8. # Global symbol "$aa" requires explicit package name at C:\projects\Tracing\test.pl line 15. # Execution of C:\projects\Tracing\test.pl aborted due to compilation errors.