in reply to Array not holding string values using Tie and IPC::Shareable. Shortened code like asked for.

I think that maybe the problem comes from the assignment in the child @ftpDirectoryListing = @deDuppedArray, but you haven't actually called pollDaemonParent($user) yet, which assigns to @deDuppedArray. I would guess that maybe if you changed main to a different order it might solve this :

pollDaemonParent($user); ## assign to @deDuppedArray my $startingInstanceNum=1; my @kids; for (1 .. $maxStripeInstance) { $stripeInstance = $startingInstanceNum; unless ($child = fork) { # i'm the child die "cannot fork: $!" unless defined $child; pollDaemonChild($user); ## read from @deDuppedArray exit; } push @kids, $child; # in case we care about their pids $startingInstanceNum++; } print "@kids\n";

I can't actually test this though... so i could be very wrong. HTH.

Just a something something...
  • Comment on Re: Array not holding string values using Tie and IPC::Shareable. Shortened code like asked for.
  • Select or Download Code

Replies are listed 'Best First'.
Re^2: Array not holding string values using Tie and IPC::Shareable. Shortened code like asked for.
by mr_p (Scribe) on Oct 22, 2009 at 15:01 UTC
    I have tried your suggestion and it does not work. Does anyone else have any other suggestions. mr_p.
      Such a comment is useless.
      First, take a minute to look at why it didn't work. Did you have a typo, or something obvious? Maybe it does actually work.
      Second, when posting, say why it didn't work. What is the error message? What is incorrect about the output?

      You should at least put down some evidence that you actually tried the suggestion instead of just dismissing it.