Do you know where your variables are? | |
PerlMonks |
Re^2: How to print called program to stdoutby pryrt (Abbot) |
on Mar 19, 2016 at 00:06 UTC ( [id://1158295]=note: print w/replies, xml ) | Need Help?? |
There are some details that would help make it easier to answer your questions. 1) What is the form of the output from your subprograms? (ie, Do they print to STDOUT or STDERR, or do they just return a value?). 2) How are you calling the subprograms from your main program? (ie, as direct function/method calls, or by system() calls or qx// or ``). Because if your subprograms are just printing to STDOUT, and you are calling them from your main program via function/method calls, it surprises me that you cannot see their output. But if you are calling a separate process (which your use of "program" rather than "function" or "method" might indicate) using a system() call, then you are going to have to switch to a print `subprogram` paradigm, otherwise the separate process's output will be lost to the system()'s ether. Update: Specifically, if your mainprogram.pl looks like: ... then i don't see why it wouldn't print. OTOH,
... edit: strikeout patently false info and fix typos from the fix. Thanks choroba
In Section
Seekers of Perl Wisdom
|
|