|go ahead... be a heretic|
CGI layoutby marlin (Initiate)
|on Oct 13, 2011 at 16:10 UTC||Need Help??|
marlin has asked for the
wisdom of the Perl Monks concerning the following question:
I am very new to Perl and CGI scripting. I know a fair bit of the Perl language but I'm having trouble putting together a CGI-driven website.
How are CGI-run websites usually organized? Is there a single script that is called when a user visits the website, and then that single script will perform all the website functions like accepting inputs, writing to a database and generating html for all the pages?
Or, is there a directory of perl scripts that are embedded into the html pages of the website? And they can each pass info to each other?
Currently I have it set up so that index.html has a Perl script embedded in the center and it outputs all the main content, but how do I make it clear the page or switch to another script, and is that even a good idea?
My goal is to make a server-side Perl program that will accept inputs from a web page, do several computations with these inputs, and then post the results in HTML (and eventually SVG) and continuously do this on the same page without having to refresh.