Here’s the design I want to accomplish in Perl:
A master script calls multiple sub-scripts. The master script controls the calling of each sub-script in a particular sequence and records output from each sub-script in order to decide whether on not to call the next script.
Currently, I have a master script that calls the sub-script using a system() call, but I am having trouble having the sub-script communicate back status to the master script.
Do not want to use sub functions, would really like to keep each of the sub-script code separate.
To shed more light on the problem:
The sub script should decide what to report back to the master script. For eg: sub script sends code 1 when sub script finds a string value in the database, it sends a code 2 when the sub string doesn’t find the file its looking for, and sends a code of 0 when everything goes fine.
Can’t you just use
exitcodes for this?Exit codes can be 255 distinct values.