http://www.perlmonks.org?node_id=1002058


in reply to How can I run a piece of code asyncronously in Perl?

If you're running on a Unix-ish system (not Windows), you can use the fork-and-exit trick to essentially make your subtask a child of init instead of your script, running it almost exactly as if you'd run it in the background from the shell: Re: Reaping Zombies (dont wanna wait).

This will run the code as an independent process; no memory will be shared between the new process and the old one. If you need to do that, threads are better.

Replies are listed 'Best First'.
Re^2: How can I run a piece of code asyncronously in Perl?
by Doctrin (Beadle) on Nov 03, 2012 at 18:53 UTC
    Wow. This is exactly what I was trying to say. TYVM!