This question is in regards to receiving info from a called program(script).
Program A calls Program B via a SYSTEM call in PROGRAM A. Program B writes out to many arrays and scalars information that Program A needs. However, when attempting to extract the values from PROGRAM B defined and populated scalars and arrays on return from PROGRAM B, the values of the arrays and acalars are empty.
Example draft of code:
Program A
system(PROGRAM B)
# on return from Program B print a PROGRAM B scalar
print "Program B has a scalar and its value is
$programB_scalar\n";
I cannot get the scalar value to print on return. I am looking to do this for several scalars and arrays created by the PROGRAM B program.
How is this done without moving the entire PROGRAM B code into PROGRAM A ? Do the scalars have to be defined a certain way ? Does the program have to be called a certain way? Or is there no way of doing this ?
Thanks.
LJS
Program A calls Program B via a SYSTEM call in PROGRAM A. Program B writes out to many arrays and scalars information that Program A needs. However, when attempting to extract the values from PROGRAM B defined and populated scalars and arrays on return from PROGRAM B, the values of the arrays and acalars are empty.
Example draft of code:
Program A
system(PROGRAM B)
# on return from Program B print a PROGRAM B scalar
print "Program B has a scalar and its value is
$programB_scalar\n";
I cannot get the scalar value to print on return. I am looking to do this for several scalars and arrays created by the PROGRAM B program.
How is this done without moving the entire PROGRAM B code into PROGRAM A ? Do the scalars have to be defined a certain way ? Does the program have to be called a certain way? Or is there no way of doing this ?
Thanks.
LJS