in reply to How can I run a portion of code (like fork() does) w/o creating its own process?

You might try experimenting with threads as they are "experimental". use Threads; but you'd better read this post by me. Modern OSs provide threads but Perl has a deficiency that basically kills any thread use.
  • Comment on Re: How can I run a portion of code (like fork() does) w/o creating its own process?
  • Download Code