You need fork or perhaps Parallel::ForkManager. If you go to Super Search and do a search for "fork" in the text you should find a few good examples. Here are some that I answered (I posted the code you want in one so it look at it as a treasure hunt!) One word of warning - spawning too many children too fast can saturate your network so don't write a Denial of Service hack on your own servers! A brief sleep before forking off each child is sound if you need to check a large network. Time::HiRes lets you sleep for a few tens of miliseconds:
my children are driving me crazy
FTP in background
PING taking too long
Forked off!
Parallel::ForkManager vs global variables
Help with waitpid and forking ?
Forked up
cheers
tachyon
s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print
In reply to Re: Non-linear sub-routine launching
by tachyon
in thread Non-linear sub-routine launching
by MadMax
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |