fetching variables with .cgi
I'm trying to get my script to echo my input to a form back to me. I use this line:
print &PrintVariables(%in); The problem is that when the script gets to this line, it halts and nothing else will be executed. So I wonder: am I trying to retrieve the variables in the wrong way? I'm using perl 5.8.8. Thanks for your help! Tillus |
Here you go...
Code:
#! /bin/perl -w |
I tried running your script, but got a Error 500, Premature end of script headers.
To be as clear as possible I Include the hole script: #!/usr/bin/perl use CGI; CGI::ReadParse(); print "Content-Type: text/html\n\n"; print "<HTML><HEAD><TITLE>"; print "Variable Listing"; print "</TITLE></HEAD><BODY>"; print "<H1>Variables Passed From Form</H1>"; print &PrintVariables(%in);This is the difficult line print "<P>dONE"; print "</BODY></HTML>"; Lots of love Tillus |
Hmm. I just re-tried the script, and it ran fine. Did you copy it exactly, make it an executable perl script, and place it in your server's cgi-bin directory? I guess you would have to modify the shebang line to point at your /usr/bin/perl.
WRT your script, this line: Quote:
Also, in perl *ALWAYS* use strict; ... and ... #! /usr/bin/perl -w These things are there to help you find bugs before you post to the internet for help. --- rod. |
All times are GMT -5. The time now is 02:10 AM. |