in reply to assign variable and shift array

Each child process gets the "frozen" @fileArray, but it is "Copy on write" - which means that any child's attempt (or the parent's attempt) to modify the array creates a local copy.

What you need to do is to pass each child an index to work on.

You will probably also need to pass back completion information to the parent.

     Syntactic sugar causes cancer of the semicolon.        --Alan Perlis

Replies are listed 'Best First'.
Re^2: assign variable and shift array
by AK7033 (Initiate) on May 06, 2011 at 19:10 UTC
    I'm not sure how to proceed but: I guess it will work something like this: my $file = $fileArray[$i];. So, what will be the best way to update that array once I assign each value? I would think this has to be done inside that loop. Thanks very much for your assistance.