On Tue, 27 May 2003 22:21:55 -0700 (PDT), [EMAIL PROTECTED]
(Soumyadeep Nandi) wrote:

>I am running a CGI script in which I am running a
>system command. The scripts is as follows:

>`/var/www/cgi-bin/emboss/water
>/var/www/cgi-bin/emboss/water1.seq
>/var/www/cgi-bin/emboss/water2.seq -gapopen 10
>-gapextend 5 -outfile
>/var/www/cgi-bin/emboss/water.out`;
>
>Above I am using the system command to run the program
>"water" which should write the output into file
>"water.out", which is not writing anything to this
>file.

I will hazard a guess that it's because you are using backticks
instead of system.
The backticks method captures the stdout to a variable, like:
$output = `ls`;

So you are not capturing any output above.
Maybe try to run it as a "system" command.

my $programtorun  =  'ls';
my @parameters    =  qw/. ../;
my @cmdline       =  ( $programtorun, @parameters );
system (@cmdline);

It can be a bit tricky getting all the parameters to your system command
to be quoted properly, try a little experimentation.
For example:
system ('water', 'water1.seq', 'water2.seq', '-outfile water.out')
may not work, while changing the outfile to
system ('water', 'water1.seq', 'water2.seq', '-outfile', 'water.out')
will. Experiment if you have trouble.

Putting the parameters in an @array = qw()  style can sometimes ease
this part of it. Just watch the quoting. Sometimes you need double
quotes if using a variable.














-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to