Xiangli Zhang wrote:
Gunnar Hjalmarsson wrote:

system(" perl test1.pl");

This is a better way to run another Perl program:

    eval "require 'test1.pl'" or die "Couldn't require test1.pl: $@";

system("phrap fasta1");

system("vi test.pl");

system("phrap fasta1") == 0 or die "'phrap fasta1' failed: $?"; system("vi test.pl") == 0 or die "'vi test.pl' failed: $?";

Following your instruction,

They were suggestions, not instructions. :)

I ran my cgi under internet browser Mozzilla and at terminal.
However, it output correctly for terminal(it automatically open vi editor and open the file "test.pl),

Aha, are you trying to open the vi editor? Then I don't think I'm able to help you; not sure if it's even possible to do that from a CGI script.

main page"test.pl" [readonly] 6L,
95C#!/usr/bin/perl -w print "Content-Type: text/html\n\n";
print "this is phrap testing file"; ~ ~ ~
~ ~ ~ ~ ~ ~ ~
~ ~ ~ ~ ~ ~ ~ Vim: Error reading input, exiting... Vim:
Finished.  Software error:


'vi test.pl' failed: 256 at /var/www/cgi-bin/jun06_uploadFile.cgi
line 78.

Among all the funny characters, I notice [readonly]. Can it possibly be that you need to change the permissions for the file to make it editable by CGI?

But, to be honest, I don't think that's enough. Hopefully somebody
else is willing to jump in and advise.

--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl

--
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