Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

running one perl script from another

Status
Not open for further replies.

bcdixit

Technical User
Nov 11, 2005
64
US
Hello,
I am trying to write a perl wrapper script that runs multiple other perl scripts. I want to get status of those perl scripts and status of those scripts on stdout.

Here is a brief explanation of what I want to do.
i have a script perl_wrapper.pl and three scripts perl_1.pl, perl_2.pl and perl_3.pl

perl_wrapper.pl will execute perl_1, perl_2 and perl_3 .
I want something like this to display something like this on the screen.

starting started

perl_1.... passed
perl_2.... passed
perl_3.... failed

I want the perl_wrapper.pl to capture the status of each of the perl scripts that it is running.

any good ways of doing this in perl? I don't have any code written for this yet. Just expecting some kind of hints.

Thanks
 
I've never tried this, but you could have your perl scripts return a value to the wrapper script that indicates success just before the program exits. Something like:

return(1);
exit;

if there are any failures while the scripts are running have the scripts return zero:

return(0);

then exit.


------------------------------------------
- Kevin, perl coder unexceptional! [wiggle]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top