I tried your example (see code below) but it didn't work.

What am I doing wrong?

#perl.exe -w # INIT ---- use Parallel::ForkControl; # VARS ---- my @collections = qw( adw adw_wet_compleet ag-dou ag-gi ag-hc ag-hlo a +g-its-sol ag-its-sol-hot agents alg_diversen alg_dossier_juris_en_res +o alg_ellis alg_ellis_en alg_kb alg_kfb alg_kluwer_rest alg_pdf alg_r +est alg_sdu am b_adw b_adw_wet_compleet b_ag-dou b_ag-gi b_ag-hc b_ag +-hlo b_ag-its-sol b_ag-its-sol-hot b_agents b_alg_diversen b_alg_doss +ier_juris_en_reso b_alg_ellis b_alg_ellis_en b_alg_kb b_alg_kfb b_alg +_kluwer_rest b_alg_pdf b_alg_rest b_alg_sdu b_am b_bibliotheek b_bm b +_bna-mix b_browsedocs b_curbel b_fmod b_help b_hvg b_hvg-kluwer b_mrp + b_pz b_refdocs b_tss b_tss-pdf bibliotheek bm bna-mix browsedocs cu +rbel fmod help hvg hvg-kluwer images mrp pz refdocs tss tss-pdf ); # SUBS ---- sub mySub { my $collection = shift; print "Col: $collection\n"; return; } # MAIN ---- my $forker = new Parallel::ForkControl( MaxKids => 5000, MinKids => 5, WatchLoad => 1, MaxLoad => 5.50, Code => &mySub ); foreach my $col (@collections) { $forker->run($col); } $forker->cleanup();

The output I get is:
Col: CANNOT RUN A IN RUN()

In reply to Re^2: Parallel tasks by john.goor
in thread Parallel tasks by john.goor

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.