Is there a default array_name for text that is brought in with a form (on the World Wide Web)? I am using perl on NERSP. Thanks. (TY)
The method by which forms-input data is sent to a CGI script depends on whether the original HTML document specified delivery via the "POST" or "GET" method.
For POST--the newer, preferred method--the data is sent as additional input that your CGI program must read (from stdin); for the older GET method, the data is passed as additional arguments after a "?" at the end of the URL. The forms-input data is not automatically copied from either place into variables/arrays.
To get the data into variables/arrays, you can use any of several widely-available "CGI parsing" utilities/packages, or write the code yourself (not recommended because there are lots of potential security problems to watch for).
For perl programming, the simplest way to access the data is to include the following statement at the beginning of your Perl program:
use CGI qw(:standard); # standard CGI functions
This will cause the Perl CGI routines which are already installed on NERSP to be callable from your program.
For information on using the Perl CGI routines, please see The Perl CGI Programming FAQ.
We welcome your comments and suggestions on this and all CNS documentation. Please send your comments to:
CNS Information Services
2124 NE Waldo Rd, Suite 2100
Gainesville Florida 32609-8922