in reply to Executing perl script from perl scripts
You can do that in perl like this:
system($^X, '1.pl'); # and check for system's return value! ok(1, 'Test 1'); system($^X, '2.pl'); ok(2, 'Test 1');
If you want to process the script output, use
my $res = qx($^X 1.pl); chomp $res; is($res, 1, '1.pl worked'); $res = qx($^X 2.pl); chomp $res; is($res, 2, '2.pl worked');
($^X is the path of the current perl interepreter)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Executing perl script from perl scripts
by palette (Scribe) on Jun 18, 2008 at 06:32 UTC | |
by Anonymous Monk on Jun 18, 2008 at 10:17 UTC | |
|
Re^2: Executing perl script from perl scripts
by palette (Scribe) on May 16, 2008 at 10:26 UTC | |
by moritz (Cardinal) on May 16, 2008 at 10:28 UTC | |
by syphilis (Archbishop) on May 16, 2008 at 10:32 UTC |