Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Where I want $var to be 2, not 1.#!/usr/bin/perl use strict; use warnings; my $var; my $pid = fork(); $var++; waitpid( $pid, 0 ); print "$var\n" if ( $pid );
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: fork()ing and sharing data amongst children
by Corion (Patriarch) on Dec 22, 2005 at 22:13 UTC | |
|
Re: fork()ing and sharing data amongst children
by traveler (Parson) on Dec 22, 2005 at 22:58 UTC | |
|
Re: fork()ing and sharing data amongst children
by QM (Parson) on Dec 23, 2005 at 00:11 UTC | |
|
Re: fork()ing and sharing data amongst children
by blazar (Canon) on Dec 23, 2005 at 11:24 UTC | |
|
Re: fork()ing and sharing data amongst children
by salva (Canon) on Dec 23, 2005 at 13:09 UTC | |
|
Re: fork()ing and sharing data amongst children
by zentara (Cardinal) on Dec 23, 2005 at 11:18 UTC |