title: Perl Parallel::ForkManager with DBI database handlers
body: <p>im interested in performing multiple database actions in parallel. I have played with Perl Parallel::ForkManager but not used it with any databases yet. I have read that database connectivity is <a href="http://www.go4expert.com/forums/showthread.php?t=9083" rel="noreferrer">not supported very well</a> with this. Does anyone have experience with this?</p>
  
  <p>As an example i would probably be spawning a system call(which does the DBI work) NOT raw code, i.e.</p>
  
  <pre><code>#!/opt/local/bin/perl -w
  
  use strict;
  use Parallel::ForkManager;
  
  $| = 1;
  
  my $max_procs = 10;
  
  my $pm =  new Parallel::ForkManager($max_procs);
  
  for (my $var = 0; $var &lt;= 10; $var++) {
    my $pid = $pm-&gt;start('proc'.$var) and next;
    sleep ( 2 );
    system( "./DBworker.pl $var" );
    $pm-&gt;finish(0); 
  }
  
  print "Waiting for child procs\n";
  $pm-&gt;wait_all_children;
  print "complete!\n";
  </code></pre>