in reply to Child Process as a Function

I'm not sure which references you've been looking at, but it's possible to just fork, and then the child process does its thing. You still need to do IPC to get any data returned, which usually means pipes. See perlipc.

As an alternative, you could use threads instead, which sounds closer to what you really want to run. Both solutions will generally run just fine under *nix and Windows environments, though the fork emulation that has to happen for Windows can lead to some peculiar behavior if you try to get clever.


#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.