use threads; ... async \&foo; ... [download]
In reply to Re: Run a subroutine in the background ? by BrowserUk in thread Run a subroutine in the background ? by sans-clue