in reply to Re: How to make perl script work simltaneously on multiple objects
in thread How to make perl script work simltaneously on multiple objects

Have you looked at Gnu's "parallel" program??

It can take a script and run it 'N' times in parallel for multiple inputs.

There's also variant called 'sem' which uses semaphores to control the number of available "processes", but

'ls' -1|parallel -j6 du -sh
would run 6 du jobs at a time on your input.

Of great interest if you really want to figure out how to do such things -- parallel is written in perl!

  • Comment on Re^2: How to make perl script work simltaneously on multiple objects
  • Download Code

Replies are listed 'Best First'.
Re^3: How to make perl script work simltaneously on multiple objects
by slayedbylucifer (Scribe) on Apr 01, 2013 at 04:20 UTC
    This is good. I immediately find a lot of places where i can use parallel. Shame I wasn't aware of this (being a Linux sys admin.. ). thanks perl-diddler.