Based on my own experience, I would agree with everything hangon said, and also recommend that you first get yourself oriented with a simpler script that uses just the CGI module, as demonstrated by Corion. As you get comfortable with the basics of how things work, start using HTML::Template. You'll appreciate how it improves things relative to using only CGI.
And then when that's working for you -- and if you want your web app to manage a wider range of activity with a minimal amount of coding, get acquainted with CGI::Application. Getting started with it is pretty easy (once you understand CGI and HTML::Template), and it really helps for keeping the code simple and manageable as the app gets bigger.
Spend some time skimming and probing the full length of the documentation that comes with each module, and then refer back to that as needed when writing code. Each manual has a lot of information (the size of the manuals might be a bit scary at first), and a lot of helpful and useful examples. When you understand the details provided in the manual about a particular function, it's a good bet that you really do know what you're doing. | [reply] |
I do not need it to be similar to the PHP way of embedding in HTML. It does get pretty messy that way.
In the Perl world, the mantra is There is more than one way to do it. This often leaves newbies in the position of having to make difficult decisions. To avoid embedding code in the PHP style, you may want to start out with CGI::Application and HTML::Template. There are tutorials on this site will help you: A Tutorial for CGI::Application, HTML::Template Tutorial and Using HTML::Template. As you gain experience, you may want to look at other options, but you can do a lot with these modules.
| [reply] |