Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Calling functions in middle of CGI HTML declarations

by flexvault (Prior)
on Aug 26, 2012 at 18:04 UTC ( #989858=note: print w/ replies, xml ) Need Help??


in reply to Calling functions in middle of CGI HTML declarations

dr.jekyllandme,

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


Comment on Re: Calling functions in middle of CGI HTML declarations
Replies are listed 'Best First'.
Re^2: Calling functions in middle of CGI HTML declarations
by Mr. Muskrat (Abbot) on Aug 26, 2012 at 18:45 UTC

      You're entitled to your opinion!

      You're not entitled to tell me what my opinion is!

      Thank you!

      "Well done is better than well said." - Benjamin Franklin

        It's the opinion of the Perl community at large. I just happen to agree with it.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://989858]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (13)
As of 2015-07-08 05:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (94 votes), past polls