in reply to Re^2: How to print called program to stdout
in thread How to print called program to stdout

I only use that on web servers. I want it to print back to the output so I can see the results in the browser. I never use it on my local machine.
  • Comment on Re^3: How to print called program to stdout

Replies are listed 'Best First'.
Re^4: How to print called program to stdout
by pryrt (Abbot) on Mar 20, 2016 at 00:22 UTC

    Then how does your "main program" call the "subprogram" during the test -- how is your test script interfacing with the webserver? Is the "main program" also on the webserver, and if so, is it calling the "subprogram" as a function call, or thru a system() or `` access, or something else? Or is the "main program" on your local machine, accesssing the webserver "subprogram" via LWP::Simple? Or something else entirely?

    Since it's printing to STDOUT to the web browser, are you sure you've not accidentally embedded the "subprogram" output inside something hidden in the HTML? Could it be inside a comment, accidentally inside a tag, or in a non-displayed element? (view-source is your friend when a CGI's output is not where you think it should be).