note rjt <p>Hello Stefan!</p> <p>The thing with a <c>fork()</c>'d model is that the operating system is creating two additional and separate processes. While they initially have (nearly) the same state as the parent, they are in fact separate, and any changes to memory (i.e., variables) in one will have no effect on the other processes, just as you would expect with any other distinct process.</p> <p>All is not lost: you will need to use some form of inter-process communication (IPC) to allow your processes to communicate their results to the parent. If you are in a POSIX environment (likely, if you are using <c>fork()</c>), you might have a look at [mod://IPC::SysV] and [mod://IPC::Msg] for a start, and do some searching on [] for other IPC modules best suited to what you need to do.</p> <p>Finally, is there a special reason you actually need a <c>fork()</c>'d model in the first place? Can you use [doc://threads] instead? Perl's threads implementation makes shared variables and semaphores between threads very easy.</p> 1022120 1022120