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.