|Do you know where your variables are?|
Re^3: How to make that works with perlby Thilosophy (Curate)
|on Apr 14, 2007 at 01:55 UTC||Need Help??|
You want to serve a page that looks like your DreamWeaver page from a CGI/Perl script.
How the page looks in a web browser depends only on the HTML of that page. It does not matter at all how that HTML was produced on the server-side: It does not matter if it is hand-written in vi, done with DreamWeaver or by print statements in a Perl program. It does not matter if it is static HTML, or made by Perl, Java, COBOL, ASP .
So, yes, of course, you can write a Perl program that outputs HTML that looks exactly like your DreamWeaver file. The easiest way is to use a templating engine (HTML::Template is one such, just search for it on CPAN or here).
When you say "dynamic content" you have to distinguish between dynamic for the client, and dynamic for the server. Your flash banner is probably not dynamic content in terms of the server. What I mean is that the HTML (the part that the server produces) will always say src="banner.swf" , which is completely static. If the DreamWeaver page you made (which is static, because it is a static HTML file) already has all the dynamic content you want, you do not need to change that HTML dynamically on the server.
I hope this is not too confusing for you. If this is your first project with Perl/CGI, I highly recommend you look at some of the tutorials here on PerlMonks. The most important concept to get a handle on IMHO is between what has to happen on the server, and what happens in the web browser. Separating these two parts cleanly can greatly improve maintainability of your application.
Update: fix CPAN link, GrandFather++