in reply to Re^2: Synchronous action
in thread Synchronous action

All you need is:

for my $client ( @clients ) { ## Note: the '1' first parameter to system ## which means that the command will be executed asynchronously system 1, qq[ robocopy $srcmachine $client ]; }

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.

Replies are listed 'Best First'.
Re^4: Synchronous action
by kingjamesid (Acolyte) on May 16, 2011 at 14:24 UTC
    Can you explain what this does? Instead of calling robocopy at the same line, I would like to copy a function with two arguments, src and dest. meaning like this.
    system 1, &startCopy( $srcMachine $client->[0]);
    But (in eclipse), its giving me a syntax error. Any suggestions on this?
      Can you explain what this does?

      Did you try looking up what the system function does?


      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.
        I dont see anything that explains about system with first arg "1".