This is a discussion on Re: Problem with system - modperl ; Sergey Kochkarev wrote: > Hi, > > I'm new to mod_perl and I got the following problem: apparently not just to mod_perl.. > > 1. system() outputs to browser. How can I turn this off? Well, yes. Anything basically that ...
Sergey Kochkarev wrote:
> I'm new to mod_perl and I got the following problem:
apparently not just to mod_perl..
> 1. system() outputs to browser. How can I turn this off?
Anything basically that your script or module prints to STDOUT, will end
up "in the browser". That's the normal way things work with cgi-bin
scripts (whether mod_perl is involved or not).
Since whatever you run "in" system() runs as a sub-process of your
script, it prints to the same STDOUT as your script, in other words to
the browser too.
If you do not want this, then re-direct the output of the command that
you run in system().
system('ls -l > /dev/null');
> 2. `` works in parallel with perl script,
as far I know, it doesn't. `command` means that you want to run
"command", and want to grab whatever it prints to STDOUT, tu put it
somewhere. In other words, `command` is a perl statement that returns a
value, and this value is the output of "command".
What is the full line where this appears ?
You normally would have something like
my $var = `command`;
and if you do, then your script, under mod_perl or not, will nicely wait
until "command" finishes, and put everything that "command" prints to
STDOUT, into $var.
Then the script will continue, but not before "command" is finished.
but I want it to finish to
> check the files it creates.
What does "command" exactly do ?
How can I synchronize `` and perl?
> I've googled the sfio term that seems to be the key to the problems. Is
> there any way to turn sfio off?
I have no idea what that is, but I doubt that it is really the cause of