|
0. testgen.pl generates a new page and sends it to the browser. (The file resides on the server and has permission set to "executable.") |
|
|
|
|
|
1. testgen1.pl generates a new page using a variable. (This is another file on the server in a sequence intended to illustrate the available features of the Perl programming language.) |
|
|
|
|
|
2. testgen2.html is a webpage that passes values to testgen2.pl using a FORM |
|
|
|
|
|
testgen2.pl - Notice that because testgen2.html (above) uses METHOD=POST, the Name value is passed to the variable via Standard Input. |
|
|
|
|
|
3. testgen3.html is the same as testgen2.html except that it calls testgen3.pl |
|
|
testgen3.pl has "theHtml" as a subroutine, passing the FORM input via element zero of the arguments array. |
|
|
|
|
|
4. testgen4.html is the same as testgen3 except for calling testgen4.pl which calls the subroutine which is now located in a separate file. |
|
|
html.pl contains the subroutine. Note that the file returns "true." |
|
|
|
|
|
testgen4.pl now simply requires the file and calls the subroutine. |
|
|
|
|
|
5. testgen5.html's FORM ACTION is the GET method. |
|
|
|
|
|
testgen5.pl needs to get the argument list from an Environment Variable. |
|
|
|
|
|
Notice that the arguments are now passed directly to the script via the URL, e.g., http://www.zapmap.com/bryan/testgen5.pl?hello there |
|