Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I want to execute a perl script and pass a parameter. In the script, I want to capture the parameter (and validate it). If not valid, then I will handle by printing a message and exiting. I have read similar petitions and suggestions and tried them, but cannot get it to work (HELP!). See below for a code snippet:
#make the call: http://www.test.com/myscript.cgi?id=1234
***Below is the snippet from myscript.cgi: #!/usr/bin/perl -w print "Content-type: text/html\n\n"; $myvalue = param("test"); print "<HTML>\n"; print "<BODY BGCOLOR=#FFFFFF>\n"; print "<CENTER>\n"; print "myvalue: $myvalue"; print "</CENTER>\n"; print "</BODY></HTML>";
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: passing and using param
by Ovid (Cardinal) on Oct 07, 2002 at 00:36 UTC | |
Re: passing and using param
by moxliukas (Curate) on Oct 06, 2002 at 23:16 UTC | |
Re: passing and using param
by varf (Acolyte) on Oct 07, 2002 at 13:50 UTC |
Back to
Seekers of Perl Wisdom