Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > Running several Perl scripts

Reply
Thread Tools

Running several Perl scripts

 
 
dysgraphia
Guest
Posts: n/a
 
      03-17-2007
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
 
Reply With Quote
 
 
 
 
Jürgen Exner
Guest
Posts: n/a
 
      03-17-2007
dysgraphia wrote:
> 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


 
Reply With Quote
 
 
 
 
dysgraphia
Guest
Posts: n/a
 
      03-17-2007
Jürgen Exner wrote:
> dysgraphia wrote:
>
>>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


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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pipe input over several scripts spoertsch Perl Misc 4 01-21-2008 04:31 PM
What is required for perl scripts to run correct when launched from rc scripts on HPUX 11? deanjones7@gmail.com Perl Misc 13 09-10-2007 11:58 AM
RDOC: several related modules in several C files Victor \Zverok\ Shepelev Ruby 3 03-16-2007 04:15 PM
Running Perl Scripts Hal Vaughan Javascript 5 01-22-2004 11:02 PM
Importing 80+ hashed and 1 array into several perl scripts Matt Breedlove Perl 1 11-24-2003 09:47 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57