in reply to Is it possible to perform concurrent action like loop?

Yes...

use threads; foreach (0..5) { async { action like printing some string, or adding two numbers, etc +... }->detach; ## Corrected per [missingthepoint]'s enigmatic post bel +ow! }

See threads, but be aware, the Devil is in the details.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"Too many [] have been sedated by an oppressive environment of political correctness and risk aversion."

Replies are listed 'Best First'.
Re^2: Is it possible to perform concurrent action like loop?
by missingthepoint (Friar) on Mar 20, 2009 at 09:11 UTC
    async { action like printing some string, or adding two numbers, etc +... }->detach;

    ?


    "Half of all adults in the United States say they have registered as an organ donor, although only some have purchased a motorcycle to show that they're really serious about it."

        You got it - that was the entire meaning of the question mark. Done lots of typing today and '?' is shorter than 'I think you have a typo'. :)


        "Half of all adults in the United States say they have registered as an organ donor, although only some have purchased a motorcycle to show that they're really serious about it."