D
debbie523
I have a program named p1.c, it works file in windows(the p1.exe works
file).
But it does not work in my perl script.
Part of my script is as following:
#!/bin/perl -w
use CGI;
$query=new CGI;
my $nominees=$query->param('n1');
my $nominations=$query->param('n2');
my $leaders=$query->param('n3');
my $followers=$query->param('n4');
my $filename=$query->param('f1');
exec ("p1.exe");
print $query->header();
print "<html><body bgcolor=black text=lime>\n";
print "<center><br><br><br><H2>get data and run the
program</H2>\n<hr>";
print "<form action='p1.cgi' method='post'>";
print "<h4>nominees = <input type='text' value=$nominees></h4>\n";
print "<h4>nominations = <input type='text'
value=$nominations></h4>\n";
print "<h4>leaders = <input type='text' value=$leaders></h4>\n";
print "<h4>followers = <input type='text' value=$followers></h4>\n";
print "<br><input type='submit' name='s1' value='ok'>";
print "</form>";
print "<h4>filename = $filename</h4>\n";
print "</center>";
print "</body></html>\n";
ps:the function of p1.exe is writing word "welcome" to a text file
"op.txt".
I appreciate your help.
file).
But it does not work in my perl script.
Part of my script is as following:
#!/bin/perl -w
use CGI;
$query=new CGI;
my $nominees=$query->param('n1');
my $nominations=$query->param('n2');
my $leaders=$query->param('n3');
my $followers=$query->param('n4');
my $filename=$query->param('f1');
exec ("p1.exe");
print $query->header();
print "<html><body bgcolor=black text=lime>\n";
print "<center><br><br><br><H2>get data and run the
program</H2>\n<hr>";
print "<form action='p1.cgi' method='post'>";
print "<h4>nominees = <input type='text' value=$nominees></h4>\n";
print "<h4>nominations = <input type='text'
value=$nominations></h4>\n";
print "<h4>leaders = <input type='text' value=$leaders></h4>\n";
print "<h4>followers = <input type='text' value=$followers></h4>\n";
print "<br><input type='submit' name='s1' value='ok'>";
print "</form>";
print "<h4>filename = $filename</h4>\n";
print "</center>";
print "</body></html>\n";
ps:the function of p1.exe is writing word "welcome" to a text file
"op.txt".
I appreciate your help.