my $outer = "foo"; sub testSub { my $inner = "baz"; my $forkID = fork(); if ($forkID == 0) { print "outer = $outer\ninner = $inner\n"; } return; } testSub();