B
Bartek Lakomiec
Hi everybody,
I'm using Windows XP, ActivePerl 5.8, Apache HTTP server 2.2.3, and
I'm in a trouble with the following piece of code (let's call it
"my_code.pl") which calls "cleartool" application to dump some data
into a temporary file (to be used later):
my $arg = ...;
my $temp_output_filename = ...;
my $cmd = "c:\\windows\\system32\\cmd.exe /c \"cleartool descr -fmt %c
" . $arg " >$temp_output_filename \"";
ret = system($cmd);
It works fine when I execute it as "perl my_code.pl" - the result is
the same as when I paste "cleartool..." in a command window.
The code fails and generates "Cannot spawn cmd.exe" error when I try
to execute it from a website. By trials and errors I concluded the
reason for that is "-fmt %c". I tried some possible ways of escaping
the percent sign, and it doesn't help.
Will appreciate any comments on possible reasons/solutions.
--BL
I'm using Windows XP, ActivePerl 5.8, Apache HTTP server 2.2.3, and
I'm in a trouble with the following piece of code (let's call it
"my_code.pl") which calls "cleartool" application to dump some data
into a temporary file (to be used later):
my $arg = ...;
my $temp_output_filename = ...;
my $cmd = "c:\\windows\\system32\\cmd.exe /c \"cleartool descr -fmt %c
" . $arg " >$temp_output_filename \"";
ret = system($cmd);
It works fine when I execute it as "perl my_code.pl" - the result is
the same as when I paste "cleartool..." in a command window.
The code fails and generates "Cannot spawn cmd.exe" error when I try
to execute it from a website. By trials and errors I concluded the
reason for that is "-fmt %c". I tried some possible ways of escaping
the percent sign, and it doesn't help.
Will appreciate any comments on possible reasons/solutions.
--BL