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

You might want to try redesigning your code to use POE (Perl Object Environment). This lets you write multitasking programs often without fork() overhead. You can design your 'child' subroutines as new Sessions, which is synonymous to a process, but without using the underlying fork() system call.
  • Comment on Re: How can I run a portion of code (like fork() does) w/o creating its own process?