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.
In reply to Re^5: Defining global variable in a subroutine
by dave_the_m
in thread Defining global variable in a subroutine
by bihuboliya
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |