I'm trying to make a cgi script using perl to call a c++ program. I have all my programs in the same directory as the cgi script. This is part of the script that I have problem with:
if($pairs[2] eq "language=Cpp" && $pairs[3] eq "datatype=ID"){
$pairs[3]=~/.+=(\w+)/;
my $ID=$1;
$pairs[4]=~/.+=(\d+)/;
my $studentID=$1;
@getC=`./main.exe $ID $studentID`; #this is where I think the program fails
} I tried to run the web page without the last line and it works. So I'm pretty sure the last line where I call the C++ program is where the script fails. But I dont know why, isnt that the way how you call a c++ program from a cgi script? Thank you in advance for your help guys!