in reply to Calling functions in middle of CGI HTML declarations
Since you're learning about CGI, I did a post about a tool here that allows you to keep the Perl code and the HTML files separate. The more I use it, the better I like it.
My cgi scripts are smaller and faster as a result of this technique.
I have expanded my use of the hash (%TWORK) so that now I keep all input fields and all calculated results in the same hash. I use 'read' to slurp the file in all at once, and then I call the subroutine once, and then print the output to the web server. You can have someone else(web/graphic designer) edit the HTML file, and your code stays intact.
Good Luck!
"Well done is better than well said." - Benjamin Franklin
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Calling functions in middle of CGI HTML declarations
by Mr. Muskrat (Canon) on Aug 26, 2012 at 18:45 UTC | |
by flexvault (Monsignor) on Aug 27, 2012 at 02:40 UTC | |
by Mr. Muskrat (Canon) on Aug 27, 2012 at 03:05 UTC |