In my perl cgi(say sequence.cgi), i want to call an
installed perl script application (phredPhrap under
directory /usr/local/bin).

I use system("phredPhrap"); to call it in my cgi file.

When I run my cgi file at command terminal
"phredPhrap" is executed, it works, but at web
browser, "phredPhrap" was not executed actually.

How may call phredPhrap? Anybody can give me some
suggestion?

thanks,

the following is my cgi code:

#!/usr/bin/perl

use CGI;


$query = new CGI;

print "Content-type: text/html\n\n";

print "<html><head><title>Perl CGI Example # 2";
print "</title></head><body><h1>";
print "Perl CGI Example # 2</h1><p>";

$query->import_names('R');


$str2="/srv/www/cgi-bin/phrap/default/chromat_dir";
chdir($str2);
#print "stop 3&&&";

system("pwd");

#print "&&&& ****";

$upload_dir =
"/srv/www/cgi-bin/phrap/default/chromat_dir";
foreach
$item("seq1","seq2","seq3","seq4","seq5","seq6",
        "seq7","seq8","seq9","seq10"){
        $filename = $query->param($item);
        $filename =~ s/.*[\/\\](.*)/$1/;
        $upload_filehandle = $query->upload($item);
        open UPLOADFILE, ">$upload_dir/$filename";
        while ( <$upload_filehandle> )
        {
          print UPLOADFILE;
        }
        close UPLOADFILE;
} 

system("phredPhrap");

print "</p>";

print "</body></html>";




                
__________________________________
Do you Yahoo!?
Vote for the stars of Yahoo!'s next ad campaign!
http://advision.webevents.yahoo.com/yahoo/votelifeengine/


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to