in reply to Re^4: Defining global variable in a subroutine
in thread Defining global variable in a subroutine
our $x = 1; my $f = fork; die $! unless defined $f; if ($f) { # parent sleep 1; print "parent: x=$x\n"; # prints 1 } else { $x = 2; exit; }
Dave.
|
|---|