in reply to loop over to utilize all cpus

Use Parallel::ForkManager or Proc::Queue.