Running several Perl scripts

Discussion in 'Perl Misc' started by dysgraphia, Mar 17, 2007.

  1. dysgraphia

    dysgraphia Guest

    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
     
    dysgraphia, Mar 17, 2007
    #1
    1. Advertising

  2. 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
     
    Jürgen Exner, Mar 17, 2007
    #2
    1. Advertising

  3. dysgraphia

    dysgraphia Guest

    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
     
    dysgraphia, Mar 17, 2007
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Matt Breedlove
    Replies:
    1
    Views:
    427
    Eduard W. Lohmann
    Nov 24, 2003
  2. Victor \Zverok\ Shepelev

    RDOC: several related modules in several C files

    Victor \Zverok\ Shepelev, Mar 6, 2007, in forum: Ruby
    Replies:
    3
    Views:
    185
    Max Lapshin
    Mar 16, 2007
  3. Hal Vaughan

    Running Perl Scripts

    Hal Vaughan, Jan 22, 2004, in forum: Javascript
    Replies:
    5
    Views:
    125
    Hal Vaughan
    Jan 22, 2004
  4. Replies:
    13
    Views:
    534
    Anno Siegel
    Sep 10, 2007
  5. spoertsch

    Pipe input over several scripts

    spoertsch, Jan 18, 2008, in forum: Perl Misc
    Replies:
    4
    Views:
    130
    J. Gleixner
    Jan 21, 2008
Loading...

Share This Page