Perl doesn't "do" this on its own; at least not if you don't use threads, and even then I doubt that Perl itself would do it (anyway, I've been given to understand that Perl's current threading implementation isn't considered production-quality, yet) ...

That does not mean that you cannot make use of your two processors, however. If your problem can be split up into two parts, you can just fork your perl process and let each process run on a different processor (as to how exactly you make different processes use different processors depends on your OS and whether it can do this automatically for you). If the processes need to exchange (limited) amounts of data, you can do this through pipes or shared memory/Inter Process Communication.

If your problem can not be split up, you are at a loss anyway, since SMP is not going to help you one bit then in any case.

BTW, please at least reread your question next time (and cut down on the errors), and use some better formatting :)


In reply to Re: SMP and Perl by ejf
in thread SMP and Perl by £okì

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.