Why does the MS Notepad application startup with my CGI scipt in it every time I request it to execuite? I obviously would prefer to see the output of the perl program rather see it in the notepad application.<br><br>I've done some limited perl CGI files on a unix web server. Now I'm trying to execute an already working perl cgi program on my own web server.<br><br>The web server is a NT Server 4.0 with IIS (service pack 5 loaded as well as IIS from option pack-4 and active perl).<br><br>I have executed the cgi perl script from the DOS prompt...and it runs just fine (expected results).<br><br><br>The problem I run into is that every time I try and execute a perl script called "example.cgi" from my internet explorer browser, the notebook application start running and it brings up the file "example.cgi" for editing.<br><br>I've check to make sure the file is named "example.cgi" ...and doesn't have a .txt on the end.<br><br>Here is the contents of "example.cgi"<br><br>&get_form_data;<br>print "Content-type: text/html\n\n";<br><br>$file="$FORM{'lastname'}"¦¦print "Failed to assign $file,$!<BR>\n";<br>$password="$FORM{'password'}"¦¦print "Unable to assign<br>$password,$!<BR>/n";<br>$request="$FORM{'request'}"¦¦print "Unable to assign $password,$!<BR>/n";<br>open(OUT,">$file"
¦¦print "Failed to open $file,$!<BR>\n";<br><br>print "<HTML>\n<BODY>\n";<br>print "</BODY>\n";<br>print"<p>Your data has been successfully sent to the web<br>server\n</p>";<br>print OUT "success";<br>print OUT $lastname;<br>print OUT $password;<br>print OUT $request;<br>close(OUT)¦¦print "Failed to close $file, $!<BR?\n";<br>exit;<br><br><br>sub get_form_data<br>{<br> #Get the input<br> read(STDIN, $buffer, $ENV{ 'CONTENT_LENGTH' } );<br> #Split the name-value pairs<br> @pairs = split(/&/, $buffer);<br> foreach $pair (@pairs)<br> {<br> ($name, $value) = split(/=/, $pair);<br> # Un-webify plus signs and %-encoding<br> $value =~ tr/+/ /;<br> $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;<br> $value =~ s/<v!--(.¦\n)*-->//g;<br> $FORM{ $name } = $value;<br> }<br>}<br><br><br>Here is HTML program that references the above CGI file:<br><br><br><html><br><br><head><br><meta http-equiv="Content-Language" content="en-us"><br><meta http-equiv="Content-Type" content="text/html; charset=windows-1252"><br><meta name="GENERATOR" content="Microsoft FrontPage 4.0"><br><meta name="ProgId" content="FrontPage.Editor.Document"><br><title>New Page 1</title><br></head><br><br><body><br><br><form method="POST" action="cgi-bin/example.cgi"><br> <p>Lastname: <input type="text" name="lastname" size="20"></p><br> <p>Password: <input type="text" name="password" size="20"></p><br> <p>Request: <input type="text" name="request" size="20"></p><br> <p> </p><br> <p><input type="submit" value="Submit" name="B1"><input type="reset" value="Reset" name="B2"></p><br></form><br><br></body><br><br></html><br><br><br><br>Any Ideas??? Help?<br><br>Jerry<br><br><br><br>