H
Huey
Hi All,
I wonder that is there any difference of calling C executable in CGI
from the "normal"? A few days ago, with helps from Tad, Jim,
Christian, I did make my perl scripts got returns from C executables.
Thanks go to Jim, Christian, and Tad! However, when I put my code into
CGI, broken! I can't figure out the kicker, thus here for help. My
code test.pl:
#!/usr/bin/perl
print "Content-type: text/html", "\n\n\n";
my $mytest = "./c_hello.exe";
open TEST, "$mytest |" or die "Error running $mytest: $!\n";
while(<TEST>) {
print "The return from C is: $_", "\n";
}
close (TEST);
exit (0);
This piece of code works in command-line: %perl test.pl, and prints
out "Hi All". But, it does not work as a CGI script with a html file.
Anybody helps me out? Thanks a lot, and wish you have a happy NEW
YEAR!
Huey
I wonder that is there any difference of calling C executable in CGI
from the "normal"? A few days ago, with helps from Tad, Jim,
Christian, I did make my perl scripts got returns from C executables.
Thanks go to Jim, Christian, and Tad! However, when I put my code into
CGI, broken! I can't figure out the kicker, thus here for help. My
code test.pl:
#!/usr/bin/perl
print "Content-type: text/html", "\n\n\n";
my $mytest = "./c_hello.exe";
open TEST, "$mytest |" or die "Error running $mytest: $!\n";
while(<TEST>) {
print "The return from C is: $_", "\n";
}
close (TEST);
exit (0);
This piece of code works in command-line: %perl test.pl, and prints
out "Hi All". But, it does not work as a CGI script with a html file.
Anybody helps me out? Thanks a lot, and wish you have a happy NEW
YEAR!
Huey