One option is to use Thread, but this (probably) requires recompiling perl. Without threads, you can't run a single subroutine in the background; it has to be an entire process. For this, use fork.
Comment on Re: How do run a subroutine in the background