Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Troubleshooting
Research
Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

Forking a processes in perl

Avatar of Marketing_Insists
Marketing_Insists asked on
Perl
3 Comments1 Solution205 ViewsLast Modified:
How could I launch the below indicated line or any other block of code on all array parameters at once in a nonlinear method?  Basically cloning the block 5 times.

I've heard of heard of fork() and the win32::process module, but I can't clearly understand how to implement what I need to do with the samples given: (win32 perl by the way)

@array = qw{ server1 server2 server3 server4 server5 };

for (@array) {
   
    # How can I clone the below line 5 times instead of running sequentially?
      push(@out,( `ping -n 120 $_` ));

}

# output results
print @out;