You probably want to use the fork function, which basically creates a child process using the same perl code. There's more details on the perldoc pages as well as here on PM, but the general idea is that your parent process can create however many instances it needs and wait for them to finish via waitpid. The children should write data to files, which the parent process can then collate and put into the final HTML file(s) that you want.
-----------------------------------------------------
Dr. Michael K. Neylon - mneylon-pm@masemware.com
||
"You've left the lens cap of your mind on again, Pinky" - The Brain
| [reply] |
my $pid = open ($handle, "-|");
if ($pid){
my $return = <$handle>;
close $handle;
# Do something with the return value
} else {
# Do something interesting
print $handle "Something interesting";
close $handle;
exit;
}
Note, I'm on a windows box so I wasn't able to test the above code, but it should be close. Now for mulitple children you'll need to use IO::Select. | [reply] [d/l] |
| [reply] |
There are several way for this to be done. Since the entire process is in Perl, an presumably in Perl, there are forking, and threads.
Threads are somewhat (very) experimental and should not be used for production work, so, fork.
I would read up on the fork function, and maybe take a look at super search, or the book "Network Programming with Perl".
remeber the immortal word's of Socrates who said, "I drank what ?" | [reply] [d/l] |
| [reply] |