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

Give this page a looking over. There are a few samples in here that should catch your eye. http://poe.perl.org/?POE_Cookbook
  • Comment on Re: How to make perl script work simltaneously on multiple objects

Replies are listed 'Best First'.
Re^2: How to make perl script work simltaneously on multiple objects
by perl-diddler (Chaplain) on Mar 30, 2013 at 00:56 UTC
    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!

      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.
Re^2: How to make perl script work simltaneously on multiple objects
by slayedbylucifer (Scribe) on Apr 01, 2013 at 04:15 UTC
    Bookmarked. Wasn't aware of this. This site looks interesting. It might be of help not only in this use-case but in future perl assignments too. Thanks.
Re^2: How to make perl script work simltaneously on multiple objects
by slayedbylucifer (Scribe) on Apr 01, 2013 at 04:17 UTC