in reply to Re: lines written to stdout by a backtick command
in thread lines written to stdout by a backtick command
I wasn't using "print `blah`;", so I tried that, but it hasn't made any difference.
The script I am writing is called by another Perl script, which expects my script to produce lines from web server logs (so lots and lots of output). My script calls another script which actually reads the web server logs and organises them chronologically, then outputs the lines to stdout.
What I need is for my script to "pass through" the stdout output from the script I call, and output it on it's own stdout.
So at the moment, I construct a command (as an array) from a number of variables concatenated together (and when I print this command without executing it, it looks correct), and then I was calling it using "system()", but I realised after looking in the Perl docs that system() will only return the exit code of the command it called, so that is obviously no use to me.
Then I found that calling a command using backticks apparently lets you see the output of the command, but I must still be doing something wrong, as it doesn't.
Drew
|
|---|