Well, I don't know how Parallel::ForkManager, but from the looks of your code it seems that $pm -> start; does a fork(), (with the parent getting a true value, and the child a false one) and $pm -> finish; does an exit.

If that is true, all the checking is done by the children, who each record which addresses are bad and good. However, the writing is done by the parent process, which didn't do any checking, and hence, has nothing to record. Note also that the children are in certain cases doing a 'next OUTER', meaning they will fork() too (and meaning some addresses will get checked many times).

Let the children write to the file. But be *VERY* careful how you open these files, you don't want one child erasing the work of another child.

If $pm -> start () does something totally different than a fork(), or $pm -> finish () something else than an exit, then this node was never written.

Abigail


In reply to Re: Fork Me I need help by Abigail-II
in thread Fork Me I need help by neilwatson

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.