[Perl-unix-users] Re: Sharing Variables among Processes...

2005-08-24 Thread pDale
On 8/24/05, Gregg Morrison <[EMAIL PROTECTED]> wrote: > > From: [EMAIL PROTECTED] > > [mailto:[EMAIL PROTECTED] On Behalf Of Arijit > > Das > > Sent: 24 August 2005 16:42 > > To: activeperl@listserv.ActiveState.com; > > perl-unix-users@listserv.ActiveState.com > > Subject: Sharing Variables among P

RE: [Perl-unix-users] Sharing Variables among Processes...

2005-08-24 Thread Matt Schneider
Perhaps others might know better but to the best of my knowledge the fork command doesn't work that way.  The child and parent are two completely separate processes that don't share any resources.  What you are looking for is something more like threads where each thread can access shared

Re: [Perl-unix-users] Sharing Variables among Processes...

2005-08-24 Thread pDale
On 8/24/05, Arijit Das <[EMAIL PROTECTED]> wrote: > Its about sharing a Perl Variable among parent and child processes. "Google - I feel lucky" for "Perl shared variable" yields: Is that what you want? -- pDale Eternal small demon

[Perl-unix-users] Sharing Variables among Processes...

2005-08-24 Thread Arijit Das
Its about sharing a Perl Variable among parent and child processes.   Do you know of any design pattern or technique by which this can be achieved?   What I want is this...   $shared_var = 10;   if ($pid = fork) {     sleep 10;     print "$shared_var\n"; # Should show the child's changes... } elsif