S
skochkarev
Hi,
I'm new to perl and find it strange sometimes. So, my question is.
As stated to perldoc, system() does not output. This is true for my
console application. But when I port it to Apache/cgi, it starts to
display all output. This is highly unwanted. Can I turn it off?
Another question. The `` works just I want with one difference: it
seems like perl does not stop until the `` finishes (but the rest of
my program needs `` finished). What operator should I put to make perl
wait until `` finishes?
Here is the piece of code:
-----------------------------------------------------------------------------------
my $cmdline = "c:\\tools\\decomp.bat";
my $param1 = "$tempdir";
my $param2 = "C:$tempfile";
my @args = ("$cmdline", "\"$param1\"", "\"$param2\"");
------ This operator puts all output to the browser ------------
system(@args);
------ This operator does not stop processing ------------
my $output = `$cmdline $param1 $param2`;
------- Code that reads files created by decomp.bat --------
Thanks in advance!
I'm new to perl and find it strange sometimes. So, my question is.
As stated to perldoc, system() does not output. This is true for my
console application. But when I port it to Apache/cgi, it starts to
display all output. This is highly unwanted. Can I turn it off?
Another question. The `` works just I want with one difference: it
seems like perl does not stop until the `` finishes (but the rest of
my program needs `` finished). What operator should I put to make perl
wait until `` finishes?
Here is the piece of code:
-----------------------------------------------------------------------------------
my $cmdline = "c:\\tools\\decomp.bat";
my $param1 = "$tempdir";
my $param2 = "C:$tempfile";
my @args = ("$cmdline", "\"$param1\"", "\"$param2\"");
------ This operator puts all output to the browser ------------
system(@args);
------ This operator does not stop processing ------------
my $output = `$cmdline $param1 $param2`;
------- Code that reads files created by decomp.bat --------
Thanks in advance!