in reply to Simple Perl "Shell" Script on Windows XP to Run Multiple, Simultaneous Processes in Parallel

Something like this?

use strict; use warnings; my $cmd = 'some_command'; my @args = qw(arg1 arg2 arg3 ... argN); system("$cmd $_) foreach @args;

The doc on the system call:
system

  • Comment on Re: Simple Perl "Shell" Script on Windows XP to Run Multiple, Simultaneous Processes in Parallel
  • Download Code

Replies are listed 'Best First'.
Re^2: Simple Perl "Shell" Script on Windows XP to Run Multiple, Simultaneous Processes in Parallel
by Jim (Curate) on Jul 29, 2009 at 04:29 UTC

    Thanks, but where's the background execution part?

    Jim

      You can modify it to:
      system("$cmd $_ &") foreach @args;
      The "&" starts the process in the background.