I'm trying to modify a script that someone else has written and I wanted to keep my script separate from his.
The script I wrote ends with a print
line that outputs all relevant data separated by spaces.
Ex: print "$sap $stuff $more_stuff";
I want to use this data in the middle of another perl script and I'm not sure if it's possible using a system call to the script I wrote.
Ex: system("./sap_calc.pl $id"); #obtain printed data from sap_calc.pl here
Can this be done? If not, how should I go about this?
Somewhat related, but not using
system()
:
How can I get one Perl script to see variables in another Perl script?