• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 169
  • Last Modified:

Running multiple SUB program at the same time

Hi gurus

Is there a way to run multiple SUB progrmans at the same time in one PERL script ? Or do I need to make multiple PERL scripts ?

So let's asume that I have program:


#!/usr/bin/perl -w

use Net::FTP;



I need to run those sub scripts at the same time and I don't want to PERL ends with the firs FTP before moving to second one.

Thanks for any advise

- Jussi

  • 2
1 Solution
U can try threading:

use Thread;

Using this module, you can write a loop like a "foreach" loop. But the good thing is that all the iterations of the loop happen parallely. You can also specify the parallelism you need.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now