Fellow monks,

I am writing a script that determines backups that needs to be done on seperate servers. After certain crteria was met it needs to execute the backup software and go on to the next server. The backup should run simultaniously but I can't seem to find a way to execute the backup.pl and go on with the script.

I've written and example of what the script should do in the following three test scripts

Altough the tests are written in windows Perl the script will run on Linux

You will find in the exec command in example below the script runs the test2.pl but not the test3.pl

Please Help

test.pl

#!c:\perl\bin eval{exec("test2.pl");}; eval{exec("test3.pl");}; print "done\n\n";

test2.pl

#!c:\perl\bin sleep(10); open(TEST,">test.log"); print TEST "hello world\n"; close TEST;

test3.pl

#!c:\perl\bin sleep(10); open(TEST,">test2.log"); print TEST "Hello World\n"; close TEST;

In reply to execute secondary script not waiting for a result and continue with script by PugSA

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.