Running several Perl scripts

D

dysgraphia

Hi all, Using Win XP, ActiveState Perl 5.8.
Question from Perl newby: If I have several Perl scripts that I would
like to run periodically how can I write a script say master_perl.pl
that runs say perl_1.pl, perl_2.pl etc.
At present I concatenate all the scripts into one long one but it seems

$my_method =~ m/ugly/; # is true

I have checked the faq and cpan sites plus done a general Google
searching but cannot find guidance...any assistance appreciated!
Cheers, Peter
 
J

Jürgen Exner

dysgraphia said:
Question from Perl newby: If I have several Perl scripts that I would
like to run periodically

If by periodically you mean recurring in regular intervals, then the 'at'
command (similar to 'cron' on Unix) is your friend. Or the Task Scheduler
from the GUI.
how can I write a script say master_perl.pl
that runs say perl_1.pl, perl_2.pl etc.

If you question is really about running (a set of) external programs which
happen to be other Perl scripts from a given Perl script, then you may want
to check out system() and/or qx().
If you are looking for parallel execution fork() and exec() would be the way
to go (although there are other methods, too)

jue
 
D

dysgraphia

Jürgen Exner said:
If by periodically you mean recurring in regular intervals, then the 'at'
command (similar to 'cron' on Unix) is your friend. Or the Task Scheduler
from the GUI.

If you question is really about running (a set of) external programs which
happen to be other Perl scripts from a given Perl script, then you may want
to check out system() and/or qx().
If you are looking for parallel execution fork() and exec() would be the way
to go (although there are other methods, too)

jue

Thanks Jürgen!, Your comments are much appreciated and sound exactly
what I have been looking for.
Your mention of Task Scheduler and the 'at' command has got me thinking
this may be the way to go instead of my manual method.

I will also look at system() and qx()...plenty here to go on with.
Thanks again for your help!
Cheers, Peter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,816
Latest member
SapanaCarpetStudio

Latest Threads

Top